1
0
mirror of https://git.tukaani.org/xz.git synced 2025-12-26 15:28:44 +00:00

Compare commits

...

176 Commits

Author SHA1 Message Date
Lasse Collin
2327a461e1 Bump version and soname for 5.2.5. 2020-03-17 16:27:42 +02:00
Lasse Collin
3be82d2f7d Update NEWS for 5.2.5. 2020-03-17 16:26:04 +02:00
Lasse Collin
ab3e57539c Translations: Rebuild cs.po to avoid incorrect fuzzy strings.
"make dist" updates the .po files and the fuzzy strings would
result in multiple very wrong translations.
2020-03-16 21:57:21 +02:00
Lasse Collin
3a6f38309d README: Update outdated sections. 2020-03-16 20:01:47 +02:00
Lasse Collin
9cc0901798 README: Mention that translatable strings will change after 5.2.x. 2020-03-16 19:46:27 +02:00
Lasse Collin
cc16357424 README: Mention that man pages can be translated. 2020-03-16 19:39:56 +02:00
Lasse Collin
ca261994ed Translations: Add partial Danish translation.
I made a few minor white space changes without getting them
approved by the Danish translation team.
2020-03-16 17:30:39 +02:00
Lasse Collin
51cd5d051f Update INSTALL.generic from Automake 1.16.1. 2020-03-16 16:43:45 +02:00
Lasse Collin
69d694e5f1 Update INSTALL for Windows and DOS and add preliminary info for z/OS. 2020-03-15 18:18:29 +02:00
Lasse Collin
2c3b1bb80a Build: Update m4/ax_pthread.m4 from Autoconf Archive (again). 2020-03-15 18:18:29 +02:00
Lasse Collin
74a5af180a xz: Never use thousand separators in DJGPP builds.
DJGPP 2.05 added support for thousands separators but it's
broken at least under WinXP with Finnish locale that uses
a non-breaking space as the thousands separator. Workaround
by disabling thousands separators for DJGPP builds.
2020-03-11 22:38:25 +02:00
Lasse Collin
ceba0d25e8 DOS: Update dos/Makefile for DJGPP 2.05.
It doesn't need -fgnu89-inline like 2.04beta did.
2020-03-11 22:38:25 +02:00
Lasse Collin
29e5bd7161 DOS: Update instructions in dos/INSTALL.txt. 2020-03-11 22:38:25 +02:00
Lasse Collin
00a037ee9c DOS: Update config.h.
The added defines assume GCC >= 4.8.
2020-03-11 22:38:25 +02:00
Lasse Collin
4ec2feaefa Translations: Add hu, zh_CN, and zh_TW.
I made a few white space changes to these without getting them
approved by the translation teams. (I tried to contact the hu and
zh_TW teams but didn't succeed. I didn't contact the zh_CN team.)
2020-03-11 22:37:54 +02:00
Lasse Collin
b6ed09729a Translations: Update vi.po to match the file from the TP.
The translated strings haven't been updated but word wrapping
is different.
2020-03-11 14:33:30 +02:00
Lasse Collin
7c85e8953c Translations: Add fi and pt_BR, and update de, fr, it, and pl.
The German translation isn't identical to the file in
the Translation Project but the changes (white space changes
only) were approved by the translator Mario Blättermann.
2020-03-11 14:18:03 +02:00
Lasse Collin
7da3ebc67f Update THANKS. 2020-03-11 13:05:37 +02:00
Lasse Collin
1acc487943 Build: Add very limited experimental CMake support.
This version matches CMake files in the master branch (commit
265daa873c0d871f5f23f9b56e133a6f20045a0a) except that this omits
two source files that aren't in v5.2 and in the beginning of
CMakeLists.txt the first paragraph in the comment is slightly
different to point out possible issues in building shared liblzma.
2020-03-11 13:05:29 +02:00
Lasse Collin
9acc6abea1 Build: Add support for --no-po4a option to autogen.sh.
Normally, if po4a isn't available, autogen.sh will return
with non-zero exit status. The option --no-po4a can be useful
when one knows that po4a isn't available but wants autogen.sh
to still return with zero exit status.
2020-03-11 12:05:57 +02:00
Lasse Collin
c8853b3154 Update m4/.gitignore. 2020-03-11 12:05:57 +02:00
Lasse Collin
901eb4a8c9 liblzma: Remove unneeded <sys/types.h> from fastpos_tablegen.c.
This file only generates fastpos_table.c.
It isn't built as a part of liblzma.
2020-03-11 12:05:57 +02:00
Lasse Collin
ac35c9585f Use defined(__GNUC__) before __GNUC__ in preprocessor lines.
This should silence the equivalent of -Wundef in compilers that
don't define __GNUC__.
2020-03-11 12:05:57 +02:00
Lasse Collin
fb9cada7cf liblzma: Add more uses of lzma_memcmplen() to the normal mode of LZMA.
This gives a tiny encoder speed improvement. This could have been done
in 2014 after the commit 544aaa3d13554e8640f9caf7db717a96360ec0f6 but
it was forgotten.
2020-03-11 12:05:57 +02:00
Lasse Collin
6117955af0 Build: Add visibility.m4 from gnulib.
Appears that this file used to get included as a side effect of
gettext. After the change to gettext version requirements this file
no longer got copied to the package and so the build was broken.
2020-03-11 12:05:57 +02:00
Lasse Collin
c2cc64d78c xz: Silence a warning when sig_atomic_t is long int.
It can be true at least on z/OS.
2020-03-11 12:05:57 +02:00
Lasse Collin
b6314aa275 xz: Avoid unneeded access of a volatile variable. 2020-03-11 12:05:57 +02:00
Lasse Collin
f772a1572f tuklib_integer.m4: Optimize the check order.
The __builtin byteswapping is the preferred one so check for it first.
2020-03-11 12:05:57 +02:00
Lasse Collin
641042e63f tuklib_exit: Add missing header.
strerror() needs <string.h> which happened to be included via
tuklib_common.h -> tuklib_config.h -> sysdefs.h if HAVE_CONFIG_H
was defined. This wasn't tested without config.h before so it
had worked fine.
2020-03-11 12:05:57 +02:00
Lasse Collin
dbd55a69e5 sysdefs.h: Omit the conditionals around string.h and limits.h.
string.h is used unconditionally elsewhere in the project and
configure has always stopped if limits.h is missing, so these
headers must have been always available even on the weirdest
systems.
2020-03-11 12:05:57 +02:00
Lasse Collin
9294909861 Build: Bump Autoconf and Libtool version requirements.
There is no specific reason for this other than blocking
the most ancient versions. These are still old:

Autoconf 2.69 (2012)
Automake 1.12 (2012)
gettext 0.19.6 (2015)
Libtool 2.4 (2010)
2020-03-11 12:05:57 +02:00
Lasse Collin
bd09081bbd Build: Use AM_GNU_GETTEXT_REQUIRE_VERSION and require 0.19.6.
This bumps the version requirement from 0.19 (from 2014) to
0.19.6 (2015).

Using only the old AM_GNU_GETTEXT_VERSION results in old
gettext infrastructure being placed in the package. By using
both macros we get the latest gettext files while the other
programs in the Autotools family can still see the old macro.
2020-03-11 12:05:57 +02:00
Lasse Collin
1e5e08d865 Translations: Add German translation of the man pages.
Thanks to Mario Blättermann.
2020-03-11 12:05:57 +02:00
Lasse Collin
4b1447809f Build: Add support for translated man pages using po4a.
The dependency on po4a is optional. It's never required to install
the translated man pages when xz is built from a release tarball.
If po4a is missing when building from xz.git, the translated man
pages won't be generated but otherwise the build will work normally.

The translations are only updated automatically by autogen.sh and
by "make mydist". This makes it easy to keep po4a as an optional
dependency and ensures that I won't forget to put updated
translations to a release tarball.

The translated man pages aren't installed if --disable-nls is used.

The installation of translated man pages abuses Automake internals
by calling "install-man" with redefined dist_man_MANS and man_MANS.
This makes the hairy script code slightly less hairy. If it breaks
some day, this code needs to be fixed; don't blame Automake developers.

Also, this adds more quotes to the existing shell script code in
the Makefile.am "-hook"s.
2020-03-11 12:05:57 +02:00
Lasse Collin
882fcfdcd8 Update THANKS (sync with the master branch). 2020-02-06 17:31:55 +02:00
Lasse Collin
134bb77658 Update tests/.gitignore. 2020-02-06 00:01:03 +02:00
Lasse Collin
6912472faf Update m4/.gitignore. 2020-02-06 00:01:03 +02:00
Lasse Collin
68c60735bb Update THANKS. 2020-02-06 00:01:03 +02:00
Lasse Collin
e1beaa74bc xz: Comment out annoying sandboxing messages. 2020-02-05 22:00:28 +02:00
Lasse Collin
8238192652 Build: Workaround a POSIX shell detection problem on Solaris.
I don't know if the problem is in gnulib's gl_POSIX_SHELL macro
or if xzgrep does something that isn't in POSIX. The workaround
adds a special case for Solaris: if /usr/xpg4/bin/sh exists and
gl_cv_posix_shell wasn't overriden on the configure command line,
use that shell for xzgrep and other scripts. That shell is known
to work and exists on most Solaris systems.
2020-02-05 22:00:28 +02:00
Lasse Collin
93a1f61e89 Build: Update m4/ax_pthread.m4 from Autoconf Archive. 2020-02-05 22:00:28 +02:00
Lasse Collin
d0daa21792 xz: Limit --memlimit-compress to at most 4020 MiB for 32-bit xz.
See the code comment for reasoning. It's far from perfect but
hopefully good enough for certain cases while hopefully doing
nothing bad in other situations.

At presets -5 ... -9, 4020 MiB vs. 4096 MiB makes no difference
on how xz scales down the number of threads.

The limit has to be a few MiB below 4096 MiB because otherwise
things like "xz --lzma2=dict=500MiB" won't scale down the dict
size enough and xz cannot allocate enough memory. With
"ulimit -v $((4096 * 1024))" on x86-64, the limit in xz had
to be no more than 4085 MiB. Some safety margin is good though.

This is hack but it should be useful when running 32-bit xz on
a 64-bit kernel that gives full 4 GiB address space to xz.
Hopefully this is enough to solve this:

https://bugzilla.redhat.com/show_bug.cgi?id=1196786

FreeBSD has a patch that limits the result in tuklib_physmem()
to SIZE_MAX on 32-bit systems. While I think it's not the way
to do it, the results on --memlimit-compress have been good. This
commit should achieve practically identical results for compression
while leaving decompression and tuklib_physmem() and thus
lzma_physmem() unaffected.
2020-02-05 22:00:28 +02:00
Lasse Collin
4433c2dc57 xz: Set the --flush-timeout deadline when the first input byte arrives.
xz --flush-timeout=2000, old version:

  1. xz is started. The next flush will happen after two seconds.
  2. No input for one second.
  3. A burst of a few kilobytes of input.
  4. No input for one second.
  5. Two seconds have passed and flushing starts.

The first second counted towards the flush-timeout even though
there was no pending data. This can cause flushing to occur more
often than needed.

xz --flush-timeout=2000, after this commit:

  1. xz is started.
  2. No input for one second.
  3. A burst of a few kilobytes of input. The next flush will
     happen after two seconds counted from the time when the
     first bytes of the burst were read.
  4. No input for one second.
  5. No input for another second.
  6. Two seconds have passed and flushing starts.
2020-02-05 22:00:28 +02:00
Lasse Collin
acc0ef3ac8 xz: Move flush_needed from mytime.h to file_pair struct in file_io.h. 2020-02-05 22:00:28 +02:00
Lasse Collin
4afe69d30b xz: coder.c: Make writing output a separate function.
The same code sequence repeats so it's nicer as a separate function.
Note that in one case there was no test for opt_mode != MODE_TEST,
but that was only because that condition would always be true, so
this commit doesn't change the behavior there.
2020-02-05 22:00:28 +02:00
Lasse Collin
ec26f3ace5 xz: Fix semi-busy-waiting in xz --flush-timeout.
When input blocked, xz --flush-timeout=1 would wake up every
millisecond and initiate flushing which would have nothing to
flush and thus would just waste CPU time. The fix disables the
timeout when no input has been seen since the previous flush.
2020-02-05 22:00:28 +02:00
Lasse Collin
3891570324 xz: Refactor io_read() a bit. 2020-02-05 22:00:28 +02:00
Lasse Collin
f6d2424534 xz: Update a comment in file_io.h. 2020-02-05 22:00:28 +02:00
Lasse Collin
15b55d5c63 xz: Move the setting of flush_needed in file_io.c to a nicer location. 2020-02-05 22:00:28 +02:00
Lasse Collin
609c706785 xz: Enable Capsicum sandboxing by default if available.
It has been enabled in FreeBSD for a while and reported to work fine.

Thanks to Xin Li.
2020-02-05 20:21:56 +02:00
Lasse Collin
00517d125c Rename unaligned_read32ne to read32ne, and similarly for the others. 2019-12-31 22:41:45 +02:00
Lasse Collin
52d89d8443 Rename read32ne to aligned_read32ne, and similarly for the others.
Using the aligned methods requires more care to ensure that
the address really is aligned, so it's nicer if the aligned
methods are prefixed. The next commit will remove the unaligned_
prefix from the unaligned methods which in liblzma are used in
more places than the aligned ones.
2019-12-31 22:34:34 +02:00
Lasse Collin
850620468b Revise tuklib_integer.h and .m4.
Add a configure option --enable-unsafe-type-punning to get the
old non-conforming memory access methods. It can be useful with
old compilers or in some other less typical situations but
shouldn't normally be used.

Omit the packed struct trick for unaligned access. While it's
best in some cases, this is simpler. If the memcpy trick doesn't
work, one can request unsafe type punning from configure.

Because CRC32/CRC64 code needs fast aligned reads, if no very
safe way to do it is found, type punning is used as a fallback.
This sucks but since it currently works in practice, it seems to
be the least bad option. It's never needed with GCC >= 4.7 or
Clang >= 3.6 since these support __builtin_assume_aligned and
thus fast aligned access can be done with the memcpy trick.

Other things:
  - Support GCC/Clang __builtin_bswapXX
  - Cleaner bswap fallback macros
  - Minor cleanups
2019-12-31 22:34:10 +02:00
Lasse Collin
a45badf034 Tests: Hopefully fix test_check.c to work on EBCDIC systems.
Thanks to Daniel Richard G.
2019-12-31 22:31:34 +02:00
Lasse Collin
c9a8071e66 Scripts: Put /usr/xpg4/bin to the beginning of PATH on Solaris.
This adds a configure option --enable-path-for-scripts=PREFIX
which defaults to empty except on Solaris it is /usr/xpg4/bin
to make POSIX grep and others available. The Solaris case had
been documented in INSTALL with a manual fix but it's better
to do this automatically since it is needed on most Solaris
systems anyway.

Thanks to Daniel Richard G.
2019-12-31 22:31:30 +02:00
Lasse Collin
aba140e2df Fix comment typos in tuklib_mbstr* files. 2019-12-31 22:27:11 +02:00
Lasse Collin
710f5bd769 Add missing include to tuklib_mbstr_width.c.
It didn't matter in XZ Utils because sysdefs.h
includes string.h anyway.
2019-12-31 22:27:11 +02:00
Lasse Collin
0e491aa8cd liblzma: Fix a buggy comment. 2019-12-31 22:26:38 +02:00
Lasse Collin
bfc245569f configure.ac: Fix a typo in a comment. 2019-12-31 22:26:38 +02:00
Lasse Collin
f18eee9d15 Tests: Silence warnings from clang -Wassign-enum.
Also changed 999 to 99 so it fits even if lzma_check happened
to be 8 bits wide.
2019-12-31 22:26:38 +02:00
Lasse Collin
25f7455472 liblzma: Add a comment. 2019-12-31 22:26:38 +02:00
Lasse Collin
44eb961f2a liblzma: Silence clang -Wmissing-variable-declarations. 2019-12-31 22:26:38 +02:00
Lasse Collin
267afcd995 xz: Silence a warning from clang -Wsign-conversion in main.c. 2019-12-31 22:25:42 +02:00
Lasse Collin
0e3c4002f8 liblzma: Remove incorrect uses of lzma_attribute((__unused__)).
Caught by clang -Wused-but-marked-unused.
2019-12-31 22:25:02 +02:00
Lasse Collin
cb708e8fa3 Tests: Silence a warning from -Wsign-conversion. 2019-12-31 22:25:02 +02:00
Lasse Collin
c8cace3d6e xz: Fix an integer overflow with 32-bit off_t.
Or any off_t which isn't very big (like signed 64 bit integer
that most system have). A small off_t could overflow if the
file being decompressed had long enough run of zero bytes,
which would result in corrupt output.
2019-12-31 22:25:02 +02:00
Lasse Collin
65a42741e2 Tests: Remove a duplicate branch from tests/tests.h.
The duplication was introduced about eleven years ago and
should have been cleaned up back then already.

This was caught by -Wduplicated-branches.
2019-12-31 22:20:10 +02:00
Lasse Collin
5c4fb60e8d tuklib_mbstr_width: Fix a warning from -Wsign-conversion. 2019-12-31 22:19:18 +02:00
Lasse Collin
37df03ce52 xz: Fix some of the warnings from -Wsign-conversion. 2019-12-31 22:19:18 +02:00
Lasse Collin
7c65ae0f5f tuklib_cpucores: Silence warnings from -Wsign-conversion. 2019-12-31 22:19:18 +02:00
Lasse Collin
a502dd1d00 xzdec: Fix warnings from -Wsign-conversion. 2019-12-31 22:19:18 +02:00
Lasse Collin
a45d1a5374 liblzma: Fix warnings from -Wsign-conversion.
Also, more parentheses were added to the literal_subcoder
macro in lzma_comon.h (better style but no functional change
in the current usage).
2019-12-31 22:19:18 +02:00
Lasse Collin
4ff87ddf80 tuklib_integer: Silence warnings from -Wsign-conversion. 2019-12-31 22:19:18 +02:00
Lasse Collin
ed1a9d3398 tuklib_integer: Fix usage of conv macros.
Use a temporary variable instead of e.g.
conv32le(unaligned_read32ne(buf)) because the macro can
evaluate its argument multiple times.
2019-12-31 22:19:18 +02:00
Lasse Collin
612c88dfc0 Update THANKS. 2019-12-31 22:19:18 +02:00
Lasse Collin
85da31d8b8 liblzma: Fix comments.
Thanks to Bruce Stark.
2019-12-31 22:19:18 +02:00
Lasse Collin
6a73a78895 liblzma: Fix one more unaligned read to use unaligned_read16ne(). 2019-12-31 22:19:18 +02:00
Lasse Collin
ce59b34ec9 Update THANKS. 2019-12-31 22:19:18 +02:00
Lasse Collin
94aa3fb568 liblzma: memcmplen: Use ctz32() from tuklib_integer.h.
The same compiler-specific #ifdefs are already in tuklib_integer.h
2019-12-31 22:19:18 +02:00
Lasse Collin
412791486d tuklib_integer: Cleanup MSVC-specific code. 2019-12-31 22:19:18 +02:00
Lasse Collin
efbf6e5f09 liblzma: Use unaligned_readXXne functions instead of type punning.
Now gcc -fsanitize=undefined should be clean.

Thanks to Jeffrey Walton.
2019-12-31 22:19:18 +02:00
Lasse Collin
29afef0348 tuklib_integer: Improve unaligned memory access.
Now memcpy() or GNU C packed structs for unaligned access instead
of type punning. See the comment in this commit for details.

Avoiding type punning with unaligned access is needed to
silence gcc -fsanitize=undefined.

New functions: unaliged_readXXne and unaligned_writeXXne where
XX is 16, 32, or 64.
2019-12-31 22:19:12 +02:00
Lasse Collin
596ed3de44 liblzma: Avoid memcpy(NULL, foo, 0) because it is undefined behavior.
I should have always known this but I didn't. Here is an example
as a reminder to myself:

    int mycopy(void *dest, void *src, size_t n)
    {
        memcpy(dest, src, n);
        return dest == NULL;
    }

In the example, a compiler may assume that dest != NULL because
passing NULL to memcpy() would be undefined behavior. Testing
with GCC 8.2.1, mycopy(NULL, NULL, 0) returns 1 with -O0 and -O1.
With -O2 the return value is 0 because the compiler infers that
dest cannot be NULL because it was already used with memcpy()
and thus the test for NULL gets optimized out.

In liblzma, if a null-pointer was passed to memcpy(), there were
no checks for NULL *after* the memcpy() call, so I cautiously
suspect that it shouldn't have caused bad behavior in practice,
but it's hard to be sure, and the problematic cases had to be
fixed anyway.

Thanks to Jeffrey Walton.
2019-07-13 17:56:28 +03:00
Lasse Collin
b4b83555c5 Update THANKS. 2019-07-13 17:54:52 +03:00
Lasse Collin
8d4906262b xz: Update xz man page date. 2019-07-13 17:54:52 +03:00
Antoine Cœur
0d318402f8 spelling 2019-07-13 17:53:33 +03:00
Lasse Collin
aeb3be8ac4 README: Update translation instructions.
XZ Utils is now part of the Translation Project
<https://translationproject.org/>.
2019-07-13 17:37:55 +03:00
Lasse Collin
0c238dc3fe Update THANKS. 2019-07-13 17:37:55 +03:00
Lasse Collin
3ca432d9cc xz: Fix a crash in progress indicator when in passthru mode.
"xz -dcfv not_an_xz_file" crashed (all four options are
required to trigger it). It caused xz to call
lzma_get_progress(&strm, ...) when no coder was initialized
in strm. In this situation strm.internal is NULL which leads
to a crash in lzma_get_progress().

The bug was introduced when xz started using lzma_get_progress()
to get progress info for multi-threaded compression, so the
bug is present in versions 5.1.3alpha and higher.

Thanks to Filip Palian <Filip.Palian@pjwstk.edu.pl> for
the bug report.
2019-07-13 17:37:55 +03:00
Lasse Collin
fcc419e3c3 xz: Update man page timestamp. 2019-07-13 17:36:27 +03:00
Pavel Raiskup
5a2fc3cd01 'have have' typos 2019-07-13 17:36:27 +03:00
Lasse Collin
7143b04fe4 xzless: Rename unused variables to silence static analysers.
In this particular case I don't see this affecting readability
of the code.

Thanks to Pavel Raiskup.
2019-07-13 17:17:00 +03:00
Lasse Collin
273c33297b liblzma: Remove an always-true condition from lzma_index_cat().
This should help static analysis tools to see that newg
isn't leaked.

Thanks to Pavel Raiskup.
2019-07-13 17:17:00 +03:00
Lasse Collin
65b4aba6d0 liblzma: Improve lzma_properties_decode() API documentation. 2019-07-13 17:17:00 +03:00
Lasse Collin
531e78e5a2 Update THANKS. 2019-05-01 16:53:55 +03:00
Lasse Collin
905de7e935 Windows: Update VS version in windows/vs2019/config.h. 2019-05-01 16:53:50 +03:00
Julien Marrec
0ffd30e172 Windows: Upgrade solution itself 2019-05-01 16:49:49 +03:00
Julien Marrec
c2ef96685f Windows: Upgrade solution with VS2019 2019-05-01 16:49:49 +03:00
Julien Marrec
25fccaf00b Windows: Duplicate windows/vs2017 before upgrading 2019-05-01 16:49:29 +03:00
Lasse Collin
1424078d63 Windows/VS2017: Omit WindowsTargetPlatformVersion from project files.
I understood that if a WTPV is specified, it's often wrong
because different VS installations have different SDK version
installed. Omitting the WTPV tag makes VS2017 default to
Windows SDK 8.1 which often is also missing, so in any case
people may need to specify the WTPV before building. But some
day in the future a missing WTPV tag will start to default to
the latest installed SDK which sounds reasonable:

https://developercommunity.visualstudio.com/content/problem/140294/windowstargetplatformversion-makes-it-impossible-t.html

Thanks to "dom".
2019-05-01 16:47:57 +03:00
Lasse Collin
b5be61cc06 Bump version and soname for 5.2.4. 2018-04-29 19:00:06 +03:00
Lasse Collin
c47fa6d067 extra/scanlzma: Fix compiler warnings. 2018-04-29 18:59:42 +03:00
Lasse Collin
7b350fe21a Add NEWS for 5.2.4. 2018-04-29 18:15:37 +03:00
Lasse Collin
5801591162 Update THANKS. 2018-03-28 19:24:39 +03:00
Ben Boeckel
c4a616f453 nothrow: use noexcept for C++11 and newer
In C++11, the `throw()` specifier is deprecated and `noexcept` is
preffered instead.
2018-03-28 19:24:39 +03:00
Lasse Collin
0b8947782f liblzma: Remove incorrect #ifdef from range_common.h.
In most cases it was harmless but it could affect some
custom build systems.

Thanks to Pippijn van Steenhoven.
2018-03-28 19:24:39 +03:00
Lasse Collin
48f3b9f73f Update THANKS. 2018-03-28 19:24:39 +03:00
Lasse Collin
a3ce3e9023 tuklib_integer: New Intel C compiler needs immintrin.h.
Thanks to Melanie Blower (Intel) for the patch.
2018-03-28 19:24:39 +03:00
Lasse Collin
4505ca4839 Update THANKS. 2018-03-28 19:23:09 +03:00
Lasse Collin
1ef3cc226e Windows: Fix paths in VS project files.
Some paths use slashes instead of backslashes as directory
separators... now it should work (I tested VS2013 version).
2018-03-28 19:23:09 +03:00
Lasse Collin
e775d2a818 Windows: Add project files for VS2017.
These files match the v5.2 branch (no file info decoder).
2018-03-28 19:23:09 +03:00
Lasse Collin
10e02e0fbb Windows: Move VS2013 files into windows/vs2013 directory. 2018-03-28 19:23:09 +03:00
Lasse Collin
06eebd4543 Fix or hide warnings from GCC 7's -Wimplicit-fallthrough. 2018-03-28 19:16:06 +03:00
Alexey Tourbin
ea4ea1dffa Docs: Fix a typo in a comment in doc/examples/02_decompress.c. 2018-03-28 19:16:06 +03:00
Lasse Collin
eb2ef4c79b xz: Fix "xz --list --robot missing_or_bad_file.xz".
It ended up printing an uninitialized char-array when trying to
print the check names (column 7) on the "totals" line.

This also changes the column 12 (minimum xz version) to
50000002 (xz 5.0.0) instead of 0 when there are no valid
input files.

Thanks to kidmin for the bug report.
2018-03-28 19:16:06 +03:00
Lasse Collin
3ea5dbd9b0 Build: Omit pre-5.0.0 entries from the generated ChangeLog.
It makes ChangeLog significantly smaller.
2018-03-28 19:16:06 +03:00
Lasse Collin
bae2467593 Update the Git repository URL to HTTPS in ChangeLog. 2018-03-28 19:16:06 +03:00
Lasse Collin
70f4792119 Update the home page URLs to HTTPS. 2018-03-28 19:16:06 +03:00
Lasse Collin
2a4b2fa75d xz: Use POSIX_FADV_RANDOM for in "xz --list" mode.
xz --list is random access so POSIX_FADV_SEQUENTIAL was clearly
wrong.
2017-03-30 22:02:10 +03:00
Lasse Collin
eb25743ade liblzma: Fix lzma_memlimit_set(strm, 0).
The 0 got treated specially in a buggy way and as a result
the function did nothing. The API doc said that 0 was supposed
to return LZMA_PROG_ERROR but it didn't.

Now 0 is treated as if 1 had been specified. This is done because
0 is already used to indicate an error from lzma_memlimit_get()
and lzma_memusage().

In addition, lzma_memlimit_set() no longer checks that the new
limit is at least LZMA_MEMUSAGE_BASE. It's counter-productive
for the Index decoder and was actually needed only by the
auto decoder. Auto decoder has now been modified to check for
LZMA_MEMUSAGE_BASE.
2017-03-30 19:52:24 +03:00
Lasse Collin
ef36c6362f liblzma: Similar memlimit fix for stream_, alone_, and auto_decoder. 2017-03-30 19:52:24 +03:00
Lasse Collin
5761603265 liblzma: Fix handling of memlimit == 0 in lzma_index_decoder().
It returned LZMA_PROG_ERROR, which was done to avoid zero as
the limit (because it's a special value elsewhere), but using
LZMA_PROG_ERROR is simply inconvenient and can cause bugs.

The fix/workaround is to treat 0 as if it were 1 byte. It's
effectively the same thing. The only weird consequence is
that then lzma_memlimit_get() will return 1 even when 0 was
specified as the limit.

This fixes a very rare corner case in xz --list where a specific
memory usage limit and a multi-stream file could print the
error message "Internal error (bug)" instead of saying that
the memory usage limit is too low.
2017-03-30 19:52:24 +03:00
Lasse Collin
3d566cd519 Bump version and soname for 5.2.3. 2016-12-30 13:26:36 +02:00
Lasse Collin
053e624fe3 Update NEWS for 5.2.3. 2016-12-30 13:25:10 +02:00
Lasse Collin
cae412b2b7 xz: Fix the Capsicum rights on user_abort_pipe. 2016-12-30 13:13:57 +02:00
Lasse Collin
9ccbae4100 Mention potential sandboxing bugs in INSTALL. 2016-12-28 21:05:22 +02:00
Lasse Collin
e013a337d3 liblzma: Avoid multiple definitions of lzma_coder structures.
Only one definition was visible in a translation unit.
It avoided a few casts and temp variables but seems that
this hack doesn't work with link-time optimizations in compilers
as it's not C99/C11 compliant.

Fixes:
http://www.mail-archive.com/xz-devel@tukaani.org/msg00279.html
2016-12-28 19:59:32 +02:00
Lasse Collin
8e0f1af3dc Document --enable-sandbox configure option in INSTALL. 2016-12-26 20:50:25 +02:00
Lasse Collin
ce2542d220 xz: Add support for sandboxing with Capsicum (disabled by default).
In the v5.2 branch this feature is considered experimental
and thus disabled by default.

The sandboxing is used conditionally as described in main.c.
This isn't optimal but it was much easier to implement than
a full sandboxing solution and it still covers the most common
use cases where xz is writing to standard output. This should
have practically no effect on performance even with small files
as fork() isn't needed.

C and locale libraries can open files as needed. This has been
fine in the past, but it's a problem with things like Capsicum.
io_sandbox_enter() tries to ensure that various locale-related
files have been loaded before cap_enter() is called, but it's
possible that there are other similar problems which haven't
been seen yet.

Currently Capsicum is available on FreeBSD 10 and later
and there is a port to Linux too.

Thanks to Loganaden Velvindron for help.
2016-12-26 20:40:27 +02:00
Lasse Collin
3ca1d5e632 Fix bugs and otherwise improve ax_check_capsicum.m4.
AU_ALIAS was removed because the new version is incompatible
with the old version.

It no longer checks for <sys/capability.h> separately.
It's enough to test for it as part of AC_CHECK_DECL.
The defines HAVE_CAPSICUM_SYS_CAPSICUM_H and
HAVE_CAPSICUM_SYS_CAPABILITY_H were removed as unneeded.
HAVE_SYS_CAPSICUM_H from AC_CHECK_HEADERS is enough.

It no longer does a useless search for the Capsicum library
if the header wasn't found.

Fixed a bug in ACTION-IF-FOUND (the first argument). Specifying
the argument omitted the default action but the given action
wasn't used instead.

AC_DEFINE([HAVE_CAPSICUM]) is now always called when Capsicum
support is found. Previously it was part of the default
ACTION-IF-FOUND which a custom action would override. Now
the default action only prepends ${CAPSICUM_LIB} to LIBS.

The documentation was updated.

Since there as no serial number, "#serial 2" was added.
2016-12-26 20:37:40 +02:00
Lasse Collin
5f3a742b64 Add m4/ax_check_capsicum.m4 for detecting Capsicum support.
The file was loaded from this web page:
https://github.com/google/capsicum-test/blob/dev/autoconf/m4/ax_check_capsicum.m4

Thanks to Loganaden Velvindron for pointing it out for me.
2016-12-26 20:37:40 +02:00
Lasse Collin
d74377e62b liblzma: Fix a memory leak in error path of lzma_index_dup().
lzma_index_dup() calls index_dup_stream() which, in case of
an error, calls index_stream_end() to free memory allocated
by index_stream_init(). However, it illogically didn't
actually free the memory. To make it logical, the tree
handling code was modified a bit in addition to changing
index_stream_end().

Thanks to Evan Nemerson for the bug report.
2016-12-26 17:57:51 +02:00
Lasse Collin
f580732216 Update THANKS. 2016-12-26 17:24:15 +02:00
Lasse Collin
88d7a7fd15 tuklib_cpucores: Add support for sched_getaffinity().
It's available in glibc (GNU/Linux, GNU/kFreeBSD). It's better
than sysconf(_SC_NPROCESSORS_ONLN) because sched_getaffinity()
gives the number of cores available to the process instead of
the total number of cores online.

As a side effect, this commit fixes a bug on GNU/kFreeBSD where
configure would detect the FreeBSD-specific cpuset_getaffinity()
but it wouldn't actually work because on GNU/kFreeBSD it requires
using -lfreebsd-glue when linking. Now the glibc-specific function
will be used instead.

Thanks to Sebastian Andrzej Siewior for the original patch
and testing.
2016-12-26 17:24:09 +02:00
Lasse Collin
51baf68437 xz: Fix copying of timestamps on Windows.
xz used to call utime() on Windows, but its result gets lost
on close(). Using _futime() seems to work.

Thanks to Martok for reporting the bug:
http://www.mail-archive.com/xz-devel@tukaani.org/msg00261.html
2016-06-30 21:00:49 +03:00
Lasse Collin
1ddc479851 xz: Silence warnings from -Wlogical-op.
Thanks to Evan Nemerson.
2016-06-28 21:11:02 +03:00
Lasse Collin
be647ff5ed Build: Fix = to += for xz_SOURCES in src/xz/Makefile.am.
Thanks to Christian Kujau.
2016-06-28 21:09:46 +03:00
Lasse Collin
fb6d50c153 Build: Bump GNU Gettext version requirement to 0.19.
It silences a few warnings and most people probably have
0.19 even on stable distributions.

Thanks to Christian Kujau.
2016-06-28 21:09:46 +03:00
Lasse Collin
74f8dad9f9 liblzma: Disable external SHA-256 by default.
This is the sane thing to do. The conflict with OpenSSL
on some OSes and especially that the OS-provided versions
can be significantly slower makes it clear that it was
a mistake to have the external SHA-256 support enabled by
default.

Those who want it can now pass --enable-external-sha256 to
configure. INSTALL was updated with notes about OSes where
this can be a bad idea.

The SHA-256 detection code in configure.ac had some bugs that
could lead to a build failure in some situations. These were
fixed, although it doesn't matter that much now that the
external SHA-256 is disabled by default.

MINIX >= 3.2.0 uses NetBSD's libc and thus has SHA256_Init
in libc instead of libutil. Support for the libutil version
was removed.
2016-06-28 21:09:46 +03:00
Lasse Collin
ea7f6ff04c Update THANKS. 2016-06-28 21:09:46 +03:00
Lasse Collin
d0e018016b Build: Avoid SHA256_Init on FreeBSD and MINIX 3.
On FreeBSD 10 and older, SHA256_Init from libmd conflicts
with libcrypto from OpenSSL. The OpenSSL version has
different sizeof(SHA256_CTX) and it can cause weird
problems if wrong SHA256_Init gets used.

Looking at the source, MINIX 3 seems to have a similar issue but
I'm not sure. To be safe, I disabled SHA256_Init on MINIX 3 too.

NetBSD has SHA256_Init in libc and they had a similar problem,
but they already fixed it in 2009.

Thanks to Jim Wilcoxson for the bug report that helped
in finding the problem.
2016-06-28 21:09:46 +03:00
Lasse Collin
5daae12391 tuklib_physmem: Hopefully silence a warning on Windows. 2016-06-28 21:09:46 +03:00
Lasse Collin
491acc406e Update THANKS. 2016-06-28 21:09:46 +03:00
Lasse Collin
8173ff8790 liblzma: Make Valgrind happier with optimized (gcc -O2) liblzma.
When optimizing, GCC can reorder code so that an uninitialized
value gets used in a comparison, which makes Valgrind unhappy.
It doesn't happen when compiled with -O0, which I tend to use
when running Valgrind.

Thanks to Rich Prohaska. I remember this being mentioned long
ago by someone else but nothing was done back then.
2016-06-28 21:09:46 +03:00
Lasse Collin
013de2b5ab liblzma: Rename lzma_presets.c back to lzma_encoder_presets.c.
It would be too annoying to update other build systems
just because of this.
2016-06-28 21:09:46 +03:00
Lasse Collin
a322f70ad9 Build: Disable xzdec, lzmadec, and lzmainfo when they cannot be built.
They all need decoder support and if that isn't available,
there's no point trying to build them.
2016-06-28 21:09:46 +03:00
Lasse Collin
8ea49606cf Build: Simplify $enable_{encoders,decoders} usage a bit. 2016-06-28 21:09:46 +03:00
Lasse Collin
42131a25e5 Windows/MSVC: Update config.h. 2016-06-28 21:09:46 +03:00
Lasse Collin
e9184e87cc DOS: Update config.h. 2016-06-28 21:09:46 +03:00
Lasse Collin
2296778f3c xz: Make xz buildable even when encoders or decoders are disabled.
The patch is quite long but it's mostly about adding new #ifdefs
to omit code when encoders or decoders have been disabled.

This adds two new #defines to config.h: HAVE_ENCODERS and
HAVE_DECODERS.
2016-06-28 21:09:46 +03:00
Lasse Collin
97a3109281 Build: Build LZMA1/2 presets also when only decoder is wanted.
People shouldn't rely on the presets when decoding raw streams,
but xz uses the presets as the starting point for raw decoder
options anyway.

lzma_encocder_presets.c was renamed to lzma_presets.c to
make it clear it's not used solely by the encoder code.
2016-06-28 21:09:46 +03:00
Lasse Collin
dc6b78d7f0 Build: Fix configure to handle LZMA1 dependency with LZMA2.
Now it gives an error if LZMA1 encoder/decoder is missing
when LZMA2 encoder/decoder was requested. Even better would
be LZMA2 implicitly enabling LZMA1 but it would need more code.
2016-06-28 21:09:46 +03:00
Lasse Collin
46d76c9cd3 Build: Don't omit lzma_cputhreads() unless using --disable-threads.
Previously it was omitted if encoders were disabled
with --disable-encoders. It didn't make sense and
it also broke the build.
2016-06-28 21:09:46 +03:00
Lasse Collin
16d68f874d liblzma: Fix a build failure related to external SHA-256 support.
If an appropriate header and structure were found by configure,
but a library with a usable SHA-256 functions wasn't, the build
failed.
2016-06-28 21:09:46 +03:00
Lasse Collin
d9311647fc xz: Always close the file before trying to delete it.
unlink() can return EBUSY in errno for open files on some
operating systems and file systems.
2016-06-28 21:09:46 +03:00
Lasse Collin
f59c4183f3 Update THANKS. 2016-06-28 21:09:46 +03:00
Lasse Collin
35f189673e Tests: Add tests for the two bugs fixed in index.c. 2016-06-28 21:09:46 +03:00
Lasse Collin
e10bfdb0fc liblzma: Fix lzma_index_dup() for empty Streams.
Stream Flags and Stream Padding weren't copied from
empty Streams.
2016-06-28 21:09:46 +03:00
Lasse Collin
06f434bd89 liblzma: Add a note to index.c for those using static analyzers. 2016-06-28 21:09:46 +03:00
Lasse Collin
9815cdf698 Bump version and soname for 5.2.2. 2015-09-29 13:59:35 +03:00
Lasse Collin
cbe0cec847 Update NEWS for 5.2.2. 2015-09-29 13:57:46 +03:00
Andre Noll
49427ce7ee Fix typo in German translation.
As pointed out by Robert Pollak, there's a typo in the German
translation of the compression preset option (-0 ... -9) help text.
"The compressor" translates to "der Komprimierer", and the genitive
form is "des Komprimierers". The old word makes no sense at all.
2015-09-28 19:05:13 +03:00
Hauke Henningsen
608d6f06c9 Update German translation, mostly wrt orthography
Provide an update of the German translation.
* A lot of compound words were previously written with spaces, while
  German orthography is relatively clear in that the components
  should not be separated.
* When referring to the actual process of (de)compression rather than the
  concept, replace “(De-)Kompression” with “(De-)Komprimierung”.
  Previously, both forms were used in this context and are now used in a
  manner consistent with “Komprimierung” being more likely to refer to
  a process.
* Consistently translate “standard input”/“output”
* Use “Zeichen” instead of false friend “Charakter” for “character”
* Insert commas around relative clauses (as required in German)
* Some other minor corrections
* Capitalize “ß” as “ẞ”
* Consistently start option descriptions in --help with capital letters

Acked-By: Andre Noll <maan@tuebingen.mpg.de>

* Update after msgmerge
2015-09-25 14:03:24 +03:00
Lasse Collin
c8988414e5 Build: Minor Cygwin cleanup.
Some tests used "cygwin*" and some used "cygwin". I changed
them all to use "cygwin". Shouldn't affect anything in practice.
2015-09-25 14:03:24 +03:00
Lasse Collin
85a6dfed53 Build: Support building of MSYS2 binaries. 2015-09-25 14:03:24 +03:00
Lasse Collin
77f270be84 Windows: Define DLL_EXPORT when building liblzma.dll with MSVC.
src/liblzma/common/common.h uses it to set __declspec(dllexport)
for the API symbols.

Thanks to Adam Walling.
2015-09-25 14:03:24 +03:00
Lasse Collin
8c975446c5 Windows: Omit unneeded header files from MSVC project files. 2015-09-25 14:03:24 +03:00
Lasse Collin
119a004349 liblzma: A MSVC-specific hack isn't needed with MSVC 2013 and newer. 2015-09-25 14:03:24 +03:00
Lasse Collin
d4e7c557fc Update THANKS. 2015-09-25 14:03:24 +03:00
Lasse Collin
98001740ca Windows: Update the docs. 2015-09-25 14:03:24 +03:00
Lasse Collin
28195e4c87 Windows: Add MSVC project files for building liblzma.
Thanks to Adam Walling for creating these files.
2015-09-25 14:03:24 +03:00
Lasse Collin
960440f323 Tests: Fix a memory leak in test_bcj_exact_size.
Thanks to Cristian Rodríguez.
2015-05-13 21:36:19 +03:00
Lasse Collin
68cd35acaf Fix NEWS about threading in 5.2.0.
Thanks to Andy Hochhaus.
2015-05-12 18:08:38 +03:00
Lasse Collin
ff96ed6d25 xz: Document that threaded decompression hasn't been implemented yet. 2015-05-11 21:26:40 +03:00
Lasse Collin
00d37b64a6 Update THANKS. 2015-04-20 20:20:29 +03:00
Lasse Collin
db190a832c Revert "xz: Use pipe2() if available."
This reverts commit 7a11c4a8e5e15f13d5fa59233b3172e65428efdd.
It is a problem when libc has pipe2() but the kernel is too
old to have pipe2() and thus pipe2() fails. In xz it's pointless
to have a fallback for non-functioning pipe2(); it's better to
avoid pipe2() completely.

Thanks to Michael Fox for the bug report.
2015-04-20 19:59:18 +03:00
180 changed files with 19669 additions and 2770 deletions

4
.gitignore vendored
View File

@ -47,11 +47,15 @@ build-aux/test-driver
/tests/compress_generated_random /tests/compress_generated_random
/tests/compress_generated_text /tests/compress_generated_text
/tests/create_compress_files /tests/create_compress_files
/tests/test_bcj_exact_size
/tests/test_block_header /tests/test_block_header
/tests/test_check /tests/test_check
/tests/test_filter_flags /tests/test_filter_flags
/tests/test_index /tests/test_index
/tests/test_stream_flags /tests/test_stream_flags
/tests/xzgrep_test_1.xz
/tests/xzgrep_test_2.xz
/tests/xzgrep_test_output
/lib/Makefile /lib/Makefile
/tests/Makefile /tests/Makefile

659
CMakeLists.txt Normal file
View File

@ -0,0 +1,659 @@
#############################################################################
#
# Very limited CMake support for building some parts of XZ Utils
#
# Building static liblzma with MSVC should work. Building shared liblzma.dll
# with MSVC may or may not work (building liblzma_w32res.rc might be broken).
# Building liblzma on a few other platforms should work too but it
# is somewhat experimental and not as portable as using ./configure.
#
# On some platforms this builds also xz and xzdec, but these are
# highly experimental and meant for testing only:
# - No large file support on those 32-bit platforms that need it
# - No replacement getopt_long(), libc must have it
# - No sandboxing support
# - No translations
# - No xz symlinks are installed
#
# Other missing things:
# - No xzgrep or other scripts or their symlinks
# - No tests (no test failures either!)
#
# NOTE: Even if the code compiles without warnings, the end result may be
# different than via ./configure. Specifically, the list of #defines
# may be different (if so, probably this CMakeLists.txt got them wrong).
#
# This file provides the following installation components (if you only
# need liblzma, install only its components!):
# - liblzma_Runtime
# - liblzma_Development
# - xz (on some platforms only)
# - xzdec (on some platforms only)
#
# To find the target liblzma::liblzma from other packages, use the CONFIG
# option with find_package() to avoid a conflict with the FindLibLZMA module
# with case-insensitive file systems. For example, to require liblzma 5.2.5
# or a newer compatible version:
#
# find_package(liblzma 5.2.5 REQUIRED CONFIG)
# target_link_libraries(my_application liblzma::liblzma)
#
#############################################################################
#
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
#############################################################################
cmake_minimum_required(VERSION 3.13...3.16 FATAL_ERROR)
include(CheckSymbolExists)
include(CheckStructHasMember)
include(cmake/tuklib_integer.cmake)
include(cmake/tuklib_cpucores.cmake)
include(cmake/tuklib_physmem.cmake)
include(cmake/tuklib_progname.cmake)
include(cmake/tuklib_mbstr.cmake)
# Get the package version from version.h into XZ_VERSION variable.
file(READ src/liblzma/api/lzma/version.h XZ_VERSION)
string(REGEX REPLACE
"^.*\n\
#define LZMA_VERSION_MAJOR ([0-9]+)\n\
#define LZMA_VERSION_MINOR ([0-9]+)\n\
#define LZMA_VERSION_PATCH ([0-9]+)\n\
.*$"
"\\1.\\2.\\3" XZ_VERSION "${XZ_VERSION}")
# Among other things, this gives us variables xz_VERSION and xz_VERSION_MAJOR.
project(xz VERSION "${XZ_VERSION}" LANGUAGES C)
# Definitions common to all targets:
add_compile_definitions(
# Package info:
PACKAGE_NAME="XZ Utils"
PACKAGE_BUGREPORT="lasse.collin@tukaani.org"
PACKAGE_URL="https://tukaani.org/xz/"
# Features:
HAVE_CHECK_CRC32
HAVE_CHECK_CRC64
HAVE_CHECK_SHA256
HAVE_DECODERS
HAVE_DECODER_ARM
HAVE_DECODER_ARMTHUMB
HAVE_DECODER_DELTA
HAVE_DECODER_IA64
HAVE_DECODER_LZMA1
HAVE_DECODER_LZMA2
HAVE_DECODER_POWERPC
HAVE_DECODER_SPARC
HAVE_DECODER_X86
HAVE_ENCODERS
HAVE_ENCODER_ARM
HAVE_ENCODER_ARMTHUMB
HAVE_ENCODER_DELTA
HAVE_ENCODER_IA64
HAVE_ENCODER_LZMA1
HAVE_ENCODER_LZMA2
HAVE_ENCODER_POWERPC
HAVE_ENCODER_SPARC
HAVE_ENCODER_X86
HAVE_MF_BT2
HAVE_MF_BT3
HAVE_MF_BT4
HAVE_MF_HC3
HAVE_MF_HC4
# Standard headers and types are available:
HAVE_STDBOOL_H
HAVE__BOOL
HAVE_STDINT_H
HAVE_INTTYPES_H
# Disable assert() checks when no build type has been specified. Non-empty
# build types like "Release" and "Debug" handle this by default.
$<$<CONFIG:>:NDEBUG>
)
# _GNU_SOURCE and such definitions. This specific macro is special since
# it also adds the definitions to CMAKE_REQUIRED_DEFINITIONS.
tuklib_use_system_extensions(ALL)
# This is needed by liblzma and xz.
tuklib_integer(ALL)
# Check for clock_gettime(). Do this before checking for threading so
# that we know there if CLOCK_MONOTONIC is available.
if(NOT WIN32 AND NOT DEFINED CACHE{HAVE_CLOCK_GETTIME})
check_symbol_exists(clock_gettime time.h HAVE_CLOCK_GETTIME)
if(NOT HAVE_CLOCK_GETTIME)
# With glibc <= 2.17 or Solaris 10 this needs librt.
unset(HAVE_CLOCK_GETTIME CACHE)
list(INSERT CMAKE_REQUIRED_LIBRARIES 0 rt)
check_symbol_exists(clock_gettime time.h HAVE_CLOCK_GETTIME)
# If it was found now, add it to all targets and keep it
# in CMAKE_REQUIRED_LIBRARIES for further tests too.
if(HAVE_CLOCK_GETTIME)
link_libraries(rt)
else()
list(REMOVE_AT CMAKE_REQUIRED_LIBRARIES 0)
endif()
endif()
if(HAVE_CLOCK_GETTIME)
# Check if CLOCK_MONOTONIC is available for clock_gettime().
check_symbol_exists(CLOCK_MONOTONIC time.h HAVE_DECL_CLOCK_MONOTONIC)
# HAVE_DECL_CLOCK_MONOTONIC should always be defined to 0 or 1
# when clock_gettime is available.
add_compile_definitions(
HAVE_CLOCK_GETTIME
HAVE_DECL_CLOCK_MONOTONIC=$<BOOL:"${HAVE_DECL_CLOCK_MONOTONIC}">
)
endif()
endif()
# Threading support:
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)
if(CMAKE_USE_WIN32_THREADS_INIT)
add_compile_definitions(MYTHREAD_VISTA)
else()
add_compile_definitions(MYTHREAD_POSIX)
# Check if pthread_condattr_setclock() exists to use CLOCK_MONOTONIC.
if(HAVE_DECL_CLOCK_MONOTONIC)
list(INSERT CMAKE_REQUIRED_LIBRARIES 0 "${CMAKE_THREAD_LIBS_INIT}")
check_symbol_exists(pthread_condattr_setclock pthread.h
HAVE_PTHREAD_CONDATTR_SETCLOCK)
tuklib_add_definition_if(ALL HAVE_PTHREAD_CONDATTR_SETCLOCK)
endif()
endif()
# Options for new enough GCC or Clang on any arch or operating system:
if(CMAKE_C_COMPILER_ID MATCHES GNU|Clang)
# configure.ac has a long list but it won't be copied here:
add_compile_options(-Wall -Wextra)
endif()
#############################################################################
# liblzma
#############################################################################
option(BUILD_SHARED_LIBS "Build liblzma as a shared library instead of static")
add_library(liblzma
src/common/mythread.h
src/common/sysdefs.h
src/common/tuklib_common.h
src/common/tuklib_config.h
src/common/tuklib_cpucores.c
src/common/tuklib_cpucores.h
src/common/tuklib_integer.h
src/common/tuklib_physmem.c
src/common/tuklib_physmem.h
src/liblzma/api/lzma.h
src/liblzma/api/lzma/base.h
src/liblzma/api/lzma/bcj.h
src/liblzma/api/lzma/block.h
src/liblzma/api/lzma/check.h
src/liblzma/api/lzma/container.h
src/liblzma/api/lzma/delta.h
src/liblzma/api/lzma/filter.h
src/liblzma/api/lzma/hardware.h
src/liblzma/api/lzma/index.h
src/liblzma/api/lzma/index_hash.h
src/liblzma/api/lzma/lzma12.h
src/liblzma/api/lzma/stream_flags.h
src/liblzma/api/lzma/version.h
src/liblzma/api/lzma/vli.h
src/liblzma/check/check.c
src/liblzma/check/check.h
src/liblzma/check/crc32_fast.c
src/liblzma/check/crc32_table.c
src/liblzma/check/crc32_table_be.h
src/liblzma/check/crc32_table_le.h
src/liblzma/check/crc64_fast.c
src/liblzma/check/crc64_table.c
src/liblzma/check/crc64_table_be.h
src/liblzma/check/crc64_table_le.h
src/liblzma/check/crc_macros.h
src/liblzma/check/sha256.c
src/liblzma/common/alone_decoder.c
src/liblzma/common/alone_decoder.h
src/liblzma/common/alone_encoder.c
src/liblzma/common/auto_decoder.c
src/liblzma/common/block_buffer_decoder.c
src/liblzma/common/block_buffer_encoder.c
src/liblzma/common/block_buffer_encoder.h
src/liblzma/common/block_decoder.c
src/liblzma/common/block_decoder.h
src/liblzma/common/block_encoder.c
src/liblzma/common/block_encoder.h
src/liblzma/common/block_header_decoder.c
src/liblzma/common/block_header_encoder.c
src/liblzma/common/block_util.c
src/liblzma/common/common.c
src/liblzma/common/common.h
src/liblzma/common/easy_buffer_encoder.c
src/liblzma/common/easy_decoder_memusage.c
src/liblzma/common/easy_encoder.c
src/liblzma/common/easy_encoder_memusage.c
src/liblzma/common/easy_preset.c
src/liblzma/common/easy_preset.h
src/liblzma/common/filter_buffer_decoder.c
src/liblzma/common/filter_buffer_encoder.c
src/liblzma/common/filter_common.c
src/liblzma/common/filter_common.h
src/liblzma/common/filter_decoder.c
src/liblzma/common/filter_decoder.h
src/liblzma/common/filter_encoder.c
src/liblzma/common/filter_encoder.h
src/liblzma/common/filter_flags_decoder.c
src/liblzma/common/filter_flags_encoder.c
src/liblzma/common/hardware_cputhreads.c
src/liblzma/common/hardware_physmem.c
src/liblzma/common/index.c
src/liblzma/common/index.h
src/liblzma/common/index_decoder.c
src/liblzma/common/index_encoder.c
src/liblzma/common/index_encoder.h
src/liblzma/common/index_hash.c
src/liblzma/common/memcmplen.h
src/liblzma/common/outqueue.c
src/liblzma/common/outqueue.h
src/liblzma/common/stream_buffer_decoder.c
src/liblzma/common/stream_buffer_encoder.c
src/liblzma/common/stream_decoder.c
src/liblzma/common/stream_decoder.h
src/liblzma/common/stream_encoder.c
src/liblzma/common/stream_encoder_mt.c
src/liblzma/common/stream_flags_common.c
src/liblzma/common/stream_flags_common.h
src/liblzma/common/stream_flags_decoder.c
src/liblzma/common/stream_flags_encoder.c
src/liblzma/common/vli_decoder.c
src/liblzma/common/vli_encoder.c
src/liblzma/common/vli_size.c
src/liblzma/delta/delta_common.c
src/liblzma/delta/delta_common.h
src/liblzma/delta/delta_decoder.c
src/liblzma/delta/delta_decoder.h
src/liblzma/delta/delta_encoder.c
src/liblzma/delta/delta_encoder.h
src/liblzma/delta/delta_private.h
src/liblzma/lz/lz_decoder.c
src/liblzma/lz/lz_decoder.h
src/liblzma/lz/lz_encoder.c
src/liblzma/lz/lz_encoder.h
src/liblzma/lz/lz_encoder_hash.h
src/liblzma/lz/lz_encoder_hash_table.h
src/liblzma/lz/lz_encoder_mf.c
src/liblzma/lzma/fastpos.h
src/liblzma/lzma/fastpos_table.c
src/liblzma/lzma/lzma2_decoder.c
src/liblzma/lzma/lzma2_decoder.h
src/liblzma/lzma/lzma2_encoder.c
src/liblzma/lzma/lzma2_encoder.h
src/liblzma/lzma/lzma_common.h
src/liblzma/lzma/lzma_decoder.c
src/liblzma/lzma/lzma_decoder.h
src/liblzma/lzma/lzma_encoder.c
src/liblzma/lzma/lzma_encoder.h
src/liblzma/lzma/lzma_encoder_optimum_fast.c
src/liblzma/lzma/lzma_encoder_optimum_normal.c
src/liblzma/lzma/lzma_encoder_presets.c
src/liblzma/lzma/lzma_encoder_private.h
src/liblzma/rangecoder/price.h
src/liblzma/rangecoder/price_table.c
src/liblzma/rangecoder/range_common.h
src/liblzma/rangecoder/range_decoder.h
src/liblzma/rangecoder/range_encoder.h
src/liblzma/simple/arm.c
src/liblzma/simple/armthumb.c
src/liblzma/simple/ia64.c
src/liblzma/simple/powerpc.c
src/liblzma/simple/simple_coder.c
src/liblzma/simple/simple_coder.h
src/liblzma/simple/simple_decoder.c
src/liblzma/simple/simple_decoder.h
src/liblzma/simple/simple_encoder.c
src/liblzma/simple/simple_encoder.h
src/liblzma/simple/simple_private.h
src/liblzma/simple/sparc.c
src/liblzma/simple/x86.c
)
target_include_directories(liblzma PRIVATE
src/liblzma/api
src/liblzma/common
src/liblzma/check
src/liblzma/lz
src/liblzma/rangecoder
src/liblzma/lzma
src/liblzma/delta
src/liblzma/simple
src/common
)
target_link_libraries(liblzma Threads::Threads)
# Put the tuklib functions under the lzma_ namespace.
target_compile_definitions(liblzma PRIVATE TUKLIB_SYMBOL_PREFIX=lzma_)
tuklib_cpucores(liblzma)
tuklib_physmem(liblzma)
# While liblzma can be built without tuklib_cpucores or tuklib_physmem
# modules, the liblzma API functions lzma_cputhreads() and lzma_physmem()
# will then be useless (which isn't too bad but still unfortunate). Since
# I expect the CMake-based builds to be only used on systems that are
# supported by these tuklib modules, problems with these tuklib modules
# are considered a hard error for now. This hopefully helps to catch bugs
# in the CMake versions of the tuklib checks.
if(NOT TUKLIB_CPUCORES_FOUND OR NOT TUKLIB_PHYSMEM_FOUND)
# Use SEND_ERROR instead of FATAL_ERROR. If someone reports a bug,
# seeing the results of the remaining checks can be useful too.
message(SEND_ERROR
"tuklib_cpucores() or tuklib_physmem() failed. "
"Unless you really are building for a system where these "
"modules are not supported (unlikely), this is a bug in the "
"included cmake/tuklib_*.cmake files that should be fixed. "
"To build anyway, edit this CMakeLists.txt to ignore this error.")
endif()
# immintrin.h:
include(CheckIncludeFile)
check_include_file(immintrin.h HAVE_IMMINTRIN_H)
if(HAVE_IMMINTRIN_H)
target_compile_definitions(liblzma PRIVATE HAVE_IMMINTRIN_H)
# SSE2 intrinsics:
include(CheckCSourceCompiles)
check_c_source_compiles("
#include <immintrin.h>
int main(void)
{
__m128i x = { 0 };
_mm_movemask_epi8(x);
return 0;
}
"
HAVE__MM_MOVEMASK_EPI8)
tuklib_add_definition_if(liblzma HAVE__MM_MOVEMASK_EPI8)
endif()
# Support -fvisiblity=hidden when building shared liblzma.
# These lines do nothing on Windows (even under Cygwin).
# HAVE_VISIBILITY should always be defined to 0 or 1.
if(BUILD_SHARED_LIBS)
set_target_properties(liblzma PROPERTIES C_VISIBILITY_PRESET hidden)
target_compile_definitions(liblzma PRIVATE HAVE_VISIBILITY=1)
else()
target_compile_definitions(liblzma PRIVATE HAVE_VISIBILITY=0)
endif()
if(WIN32)
if(BUILD_SHARED_LIBS)
# Add the Windows resource file for liblzma.dll.
target_sources(liblzma PRIVATE src/liblzma/liblzma_w32res.rc)
# Export the public API symbols with __declspec(dllexport).
target_compile_definitions(liblzma PRIVATE DLL_EXPORT)
else()
# Disable __declspec(dllimport) when linking against static liblzma.
target_compile_definitions(liblzma INTERFACE LZMA_API_STATIC)
endif()
elseif(CMAKE_SYSTEM_NAME MATCHES "^Linux$|^FreeBSD$")
# Symbol versioning for shared liblzma. This doesn't affect static builds.
target_link_options(liblzma PRIVATE
"-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/liblzma/liblzma.map"
)
set_target_properties(liblzma PROPERTIES
LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/liblzma/liblzma.map"
LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/common/common_w32res.rc"
)
endif()
set_target_properties(liblzma PROPERTIES
# At least for now the package versioning matches the rules used for
# shared library versioning (excluding development releases) so it is
# fine to use the package version here.
SOVERSION "${xz_VERSION_MAJOR}"
VERSION "${xz_VERSION}"
# It's liblzma.so or liblzma.dll, not libliblzma.so or lzma.dll.
# Avoid the name lzma.dll because it would conflict with LZMA SDK.
PREFIX ""
)
# Create liblzmaConfigVersion.cmake.
#
# FIXME: SameMajorVersion is correct for stable releases but it is wrong
# for development releases where each release may have incompatible changes.
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/liblzmaConfigVersion.cmake"
VERSION "${liblzma_VERSION}"
COMPATIBILITY SameMajorVersion)
# Create liblzmaConfig.cmake.
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/liblzmaConfig.cmake"
"include(CMakeFindDependencyMacro)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_dependency(Threads)
include(\"\${CMAKE_CURRENT_LIST_DIR}/liblzmaTargets.cmake\")
")
# Set CMAKE_INSTALL_LIBDIR and friends.
include(GNUInstallDirs)
# Install the library binary. The INCLUDES specifies the include path that
# is exported for other projects to use but it doesn't install any files.
install(TARGETS liblzma EXPORT liblzmaTargets
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
COMPONENT liblzma_Runtime
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
COMPONENT liblzma_Runtime
NAMELINK_COMPONENT liblzma_Development
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
COMPONENT liblzma_Development
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
# Install the liblzma API headers. These use a subdirectory so
# this has to be done as a separate step.
install(DIRECTORY src/liblzma/api/
COMPONENT liblzma_Development
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
FILES_MATCHING PATTERN "*.h")
# Install the CMake files that other packages can use to find liblzma.
set(liblzma_INSTALL_CMAKEDIR
"${CMAKE_INSTALL_LIBDIR}/cmake/liblzma"
CACHE STRING "Path to liblzma's .cmake files")
install(EXPORT liblzmaTargets
NAMESPACE liblzma::
FILE liblzmaTargets.cmake
DESTINATION "${liblzma_INSTALL_CMAKEDIR}"
COMPONENT liblzma_Development)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblzmaConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/liblzmaConfigVersion.cmake"
DESTINATION "${liblzma_INSTALL_CMAKEDIR}"
COMPONENT liblzma_Development)
#############################################################################
# getopt_long
#############################################################################
# The command line tools needs this.
check_symbol_exists(getopt_long getopt.h HAVE_GETOPT_LONG)
#############################################################################
# xzdec
#############################################################################
if(HAVE_GETOPT_LONG)
add_executable(xzdec
src/common/sysdefs.h
src/common/tuklib_common.h
src/common/tuklib_config.h
src/common/tuklib_exit.c
src/common/tuklib_exit.h
src/common/tuklib_gettext.h
src/common/tuklib_progname.c
src/common/tuklib_progname.h
src/xzdec/xzdec.c
)
target_include_directories(xzdec PRIVATE
src/common
src/liblzma/api
)
target_link_libraries(xzdec PRIVATE liblzma)
tuklib_progname(xzdec)
install(TARGETS xzdec
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
COMPONENT xzdec)
if(UNIX)
install(FILES src/xzdec/xzdec.1
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
COMPONENT xzdec)
endif()
endif()
#############################################################################
# xz
#############################################################################
if(NOT MSVC AND HAVE_GETOPT_LONG)
add_executable(xz
src/common/mythread.h
src/common/sysdefs.h
src/common/tuklib_common.h
src/common/tuklib_config.h
src/common/tuklib_exit.c
src/common/tuklib_exit.h
src/common/tuklib_gettext.h
src/common/tuklib_integer.h
src/common/tuklib_mbstr.h
src/common/tuklib_mbstr_fw.c
src/common/tuklib_mbstr_width.c
src/common/tuklib_open_stdxxx.c
src/common/tuklib_open_stdxxx.h
src/common/tuklib_progname.c
src/common/tuklib_progname.h
src/xz/args.c
src/xz/args.h
src/xz/coder.c
src/xz/coder.h
src/xz/file_io.c
src/xz/file_io.h
src/xz/hardware.c
src/xz/hardware.h
src/xz/list.c
src/xz/list.h
src/xz/main.c
src/xz/main.h
src/xz/message.c
src/xz/message.h
src/xz/mytime.c
src/xz/mytime.h
src/xz/options.c
src/xz/options.h
src/xz/private.h
src/xz/signals.c
src/xz/signals.h
src/xz/suffix.c
src/xz/suffix.h
src/xz/util.c
src/xz/util.h
)
target_include_directories(xz PRIVATE
src/common
src/liblzma/api
)
target_link_libraries(xz PRIVATE liblzma)
target_compile_definitions(xz PRIVATE ASSUME_RAM=128)
tuklib_progname(xz)
tuklib_mbstr(xz)
check_symbol_exists(optreset getopt.h HAVE_OPTRESET)
tuklib_add_definition_if(xz HAVE_OPTRESET)
check_symbol_exists(posix_fadvise fcntl.h HAVE_POSIX_FADVISE)
tuklib_add_definition_if(xz HAVE_POSIX_FADVISE)
# How to get file time:
check_struct_has_member("struct stat" st_atim.tv_nsec
"sys/types.h;sys/stat.h"
HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC)
if(HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC)
tuklib_add_definitions(xz HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC)
else()
check_struct_has_member("struct stat" st_atimespec.tv_nsec
"sys/types.h;sys/stat.h"
HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC)
if(HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC)
tuklib_add_definitions(xz HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC)
else()
check_struct_has_member("struct stat" st_atimensec
"sys/types.h;sys/stat.h"
HAVE_STRUCT_STAT_ST_ATIMENSEC)
tuklib_add_definition_if(xz HAVE_STRUCT_STAT_ST_ATIMENSEC)
endif()
endif()
# How to set file time:
check_symbol_exists(futimens "sys/types.h;sys/stat.h" HAVE_FUTIMENS)
if(HAVE_FUTIMENS)
tuklib_add_definitions(xz HAVE_FUTIMENS)
else()
check_symbol_exists(futimes "sys/time.h" HAVE_FUTIMES)
if(HAVE_FUTIMES)
tuklib_add_definitions(xz HAVE_FUTIMES)
else()
check_symbol_exists(futimesat "sys/time.h" HAVE_FUTIMESAT)
if(HAVE_FUTIMESAT)
tuklib_add_definitions(xz HAVE_FUTIMESAT)
else()
check_symbol_exists(utimes "sys/time.h" HAVE_UTIMES)
if(HAVE_UTIMES)
tuklib_add_definitions(xz HAVE_UTIMES)
else()
check_symbol_exists(_futime "sys/utime.h" HAVE__FUTIME)
if(HAVE__FUTIME)
tuklib_add_definitions(xz HAVE__FUTIME)
else()
check_symbol_exists(utime "utime.h" HAVE_UTIME)
tuklib_add_definition_if(xz HAVE_UTIME)
endif()
endif()
endif()
endif()
endif()
install(TARGETS xz
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
COMPONENT xz)
install(FILES src/xz/xz.1
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
COMPONENT xz)
endif()

View File

@ -47,7 +47,7 @@ XZ Utils Licensing
naturally it is not legally required. Here is an example of a good naturally it is not legally required. Here is an example of a good
notice to put into "about box" or into documentation: notice to put into "about box" or into documentation:
This software includes code from XZ Utils <http://tukaani.org/xz/>. This software includes code from XZ Utils <https://tukaani.org/xz/>.
The following license texts are included in the following files: The following license texts are included in the following files:
- COPYING.LGPLv2.1: GNU Lesser General Public License version 2.1 - COPYING.LGPLv2.1: GNU Lesser General Public License version 2.1

View File

@ -1,6 +1,6 @@
See the commit log in the git repository: See the commit log in the git repository:
git clone http://git.tukaani.org/xz.git git clone https://git.tukaani.org/xz.git
Note that "make dist" doesn't put this tiny file into the package. Note that "make dist" doesn't put this tiny file into the package.
Instead, the git commit log is used as ChangeLog. See dist-hook in Instead, the git commit log is used as ChangeLog. See dist-hook in

View File

@ -564,7 +564,7 @@ REFERENCES_RELATION = YES
# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
# link to the source code. Otherwise they will link to the documentstion. # link to the source code. Otherwise they will link to the documentation.
REFERENCES_LINK_SOURCE = YES REFERENCES_LINK_SOURCE = YES

171
INSTALL
View File

@ -14,6 +14,7 @@ XZ Utils Installation
1.2.6. Tru64 1.2.6. Tru64
1.2.7. Windows 1.2.7. Windows
1.2.8. DOS 1.2.8. DOS
1.2.9. z/OS
1.3. Adding support for new platforms 1.3. Adding support for new platforms
2. configure options 2. configure options
2.1. Static vs. dynamic linking of liblzma 2.1. Static vs. dynamic linking of liblzma
@ -123,8 +124,11 @@ XZ Utils Installation
as an argument to the configure script. as an argument to the configure script.
test_scripts.sh in "make check" may fail if good enough tools are test_scripts.sh in "make check" may fail if good enough tools are
missing from PATH (/usr/xpg4/bin or /usr/xpg6/bin). See sections missing from PATH (/usr/xpg4/bin or /usr/xpg6/bin). Nowadays
4.5 and 3.2 for more information. /usr/xpg4/bin is added to the script PATH by default on Solaris
(see --enable-path-for-scripts=PREFIX in section 2), but old xz
releases needed extra steps. See sections 4.5 and 3.2 for more
information.
1.2.6. Tru64 1.2.6. Tru64
@ -136,22 +140,42 @@ XZ Utils Installation
1.2.7. Windows 1.2.7. Windows
Building XZ Utils on Windows is supported under MinGW + MSYS, If it is enough to build liblzma (no command line tools):
MinGW-w64 + MSYS, and Cygwin. There is windows/build.bash to
ease packaging XZ Utils with MinGW(-w64) + MSYS into a - There is experimental CMake support. As it is, it should be
redistributable .zip or .7z file. See windows/INSTALL-Windows.txt good enough to build static liblzma with Visual Studio.
for more information. Building liblzma.dll might work too (if it doesn't, it should
be fixed). The CMake support may work with MinGW or MinGW-w64.
Read the comment in the beginning of CMakeLists.txt before
running CMake!
- There are Visual Studio project files under the "windows"
directory. See windows/INSTALL-MSVC.txt. In the future the
project files will be removed when CMake support is good
enough. Thus, please test the CMake version and help fix
possible issues.
To build also the command line tools:
- MinGW-w64 + MSYS (32-bit and 64-bit x86): This is used
for building the official binary packages for Windows.
There is windows/build.bash to ease packaging XZ Utils with
MinGW(-w64) + MSYS into a redistributable .zip or .7z file.
See windows/INSTALL-MinGW.txt for more information.
- MinGW + MSYS (32-bit x86): I haven't recently tested this.
- Cygwin 1.7.35 and later: NOTE that using XZ Utils >= 5.2.0
under Cygwin older than 1.7.35 can lead to DATA LOSS! If
you must use an old Cygwin version, stick to XZ Utils 5.0.x
which is safe under older Cygwin versions. You can check
the Cygwin version with the command "cygcheck -V".
It may be possible to build liblzma with other toolchains too, but It may be possible to build liblzma with other toolchains too, but
that will probably require writing a separate makefile. Building that will probably require writing a separate makefile. Building
the command line tools with non-GNU toolchains will be harder than the command line tools with non-GNU toolchains will be harder than
building only liblzma. building only liblzma.
Starting with XZ Utils 5.2.0, building liblzma (not the whole
XZ Utils) should work with MSVC 2013 update 2 or later using
windows/config.h. No project files or makefiles are included yet,
so the build process isn't as convenient yet as it could be.
Even if liblzma is built with MinGW(-w64), the resulting DLL can Even if liblzma is built with MinGW(-w64), the resulting DLL can
be used by other compilers and linkers, including MSVC. See be used by other compilers and linkers, including MSVC. See
windows/README-Windows.txt for details. windows/README-Windows.txt for details.
@ -159,12 +183,31 @@ XZ Utils Installation
1.2.8. DOS 1.2.8. DOS
There is an experimental Makefile in the "dos" directory to build There is a Makefile in the "dos" directory to build XZ Utils on
XZ Utils on DOS using DJGPP. Support for long file names (LFN) is DOS using DJGPP. Support for long file names (LFN) is needed at
needed. See dos/README for more information. build time but the resulting xz.exe works without LFN support too.
See dos/INSTALL.txt and dos/README.txt for more information.
GNU Autotools based build hasn't been tried on DOS. If you try, I
would like to hear if it worked. 1.2.9. z/OS
To build XZ Utils on z/OS UNIX System Services using xlc, pass
these options to the configure script: CC='xlc -qhaltonmsg=CCN3296'
CPPFLAS='-D_UNIX03_THREADS -D_XOPEN_SOURCE=600'. The first makes
xlc throw an error if a header file is missing, which is required
to make the tests in configure work. The CPPFLAGS are needed to
get pthread support (some other CPPFLAGS may work too; if there
are problems, try -D_UNIX95_THREADS instead of -D_UNIX03_THREADS).
test_scripts.sh in "make check" will fail even if the scripts
actually work because the test data includes compressed files
with US-ASCII text.
No other tests should fail. If test_files.sh fails, check that
the included .xz test files weren't affected by EBCDIC conversion.
XZ Utils doesn't have code to detect the amount of physical RAM and
number of CPU cores on z/OS.
1.3. Adding support for new platforms 1.3. Adding support for new platforms
@ -237,6 +280,42 @@ XZ Utils Installation
the liblzma ABI, so this option should be used only when the liblzma ABI, so this option should be used only when
it is known to not cause problems. it is known to not cause problems.
--enable-external-sha256
Try to use SHA-256 code from the operating system libc
or similar base system libraries. This doesn't try to
use OpenSSL or libgcrypt or such libraries.
The reasons to use this option:
- It makes liblzma slightly smaller.
- It might improve SHA-256 speed if the implementation
in the operating is very good (but see below).
External SHA-256 is disabled by default for two reasons:
- On some operating systems the symbol names of the
SHA-256 functions conflict with OpenSSL's libcrypto.
This causes weird problems such as decompression
errors if an application is linked against both
liblzma and libcrypto. This problem affects at least
FreeBSD 10 and older and MINIX 3.3.0 and older, but
other OSes that provide a function "SHA256_Init" might
also be affected. FreeBSD 11 has the problem fixed.
NetBSD had the problem but it was fixed it in 2009
already. OpenBSD uses "SHA256Init" and thus never had
a conflict with libcrypto.
- The SHA-256 code in liblzma is faster than the SHA-256
code provided by some operating systems. If you are
curious, build two copies of xz (internal and external
SHA-256) and compare the decompression (xz --test)
times:
dd if=/dev/zero bs=1024k count=1024 \
| xz -v -0 -Csha256 > foo.xz
time xz --test foo.xz
--disable-xz --disable-xz
--disable-xzdec --disable-xzdec
--disable-lzmadec --disable-lzmadec
@ -354,6 +433,28 @@ XZ Utils Installation
calls any liblzma functions from more than calls any liblzma functions from more than
one thread, something bad may happen. one thread, something bad may happen.
--enable-sandbox=METHOD
There is limited sandboxing support in the xz tool. If
built with sandbox support, it's used automatically when
(de)compressing exactly one file to standard output and
the options --files or --files0 weren't used. This is a
common use case, for example, (de)compressing .tar.xz
files via GNU tar. The sandbox is also used for
single-file `xz --test' or `xz --list'.
Supported METHODs:
auto Look for a supported sandboxing method
and use it if found. If no method is
found, then sandboxing isn't used.
no Disable sandboxing support.
capsicum
Use Capsicum (FreeBSD >= 10) for
sandboxing. If no Capsicum support
is found, configure will give an error.
--enable-symbol-versions --enable-symbol-versions
Use symbol versioning for liblzma. This is enabled by Use symbol versioning for liblzma. This is enabled by
default on GNU/Linux, other GNU-based systems, and default on GNU/Linux, other GNU-based systems, and
@ -370,6 +471,23 @@ XZ Utils Installation
and should work on most systems. This has no effect on the and should work on most systems. This has no effect on the
resulting binaries. resulting binaries.
--enable-path-for-scripts=PREFIX
If PREFIX isn't empty, PATH=PREFIX:$PATH will be set in
the beginning of the scripts (xzgrep and others).
The default is empty except on Solaris the default is
/usr/xpg4/bin.
This can be useful if the default PATH doesn't contain
modern POSIX tools (as can be the case on Solaris) or if
one wants to ensure that the correct xz binary is in the
PATH for the scripts. Note that the latter use can break
"make check" if the prefixed PATH causes a wrong xz binary
(other than the one that was just built) to be used.
Older xz releases support a different method for setting
the PATH for the scripts. It is described in section 3.2
and is supported in this xz version too.
2.1. Static vs. dynamic linking of liblzma 2.1. Static vs. dynamic linking of liblzma
@ -442,11 +560,17 @@ XZ Utils Installation
3.2. PATH 3.2. PATH
The method described below is supported by older xz releases.
It is supported by the current version too, but the newer
--enable-path-for-scripts=PREFIX described in section 2 may be
more convenient.
The scripts assume that the required tools (standard POSIX utilities, The scripts assume that the required tools (standard POSIX utilities,
mktemp, and xz) are in PATH; the scripts don't set the PATH themselves. mktemp, and xz) are in PATH; the scripts don't set the PATH themselves
Some people like this while some think this is a bug. Those in the (except as described for --enable-path-for-scripts=PREFIX). Some
latter group can easily patch the scripts before running the configure people like this while some think this is a bug. Those in the latter
script by taking advantage of a placeholder line in the scripts. group can easily patch the scripts before running the configure script
by taking advantage of a placeholder line in the scripts.
For example, to make the scripts prefix /usr/bin:/bin to PATH: For example, to make the scripts prefix /usr/bin:/bin to PATH:
@ -520,8 +644,9 @@ XZ Utils Installation
some tools are missing from the current PATH or the tools lack some tools are missing from the current PATH or the tools lack
support for some POSIX features. This can happen at least on support for some POSIX features. This can happen at least on
Solaris where the tools in /bin may be ancient but good enough Solaris where the tools in /bin may be ancient but good enough
tools are available in /usr/xpg4/bin or /usr/xpg6/bin. One fix tools are available in /usr/xpg4/bin or /usr/xpg6/bin. For possible
for this problem is described in section 3.2 of this file. fixes, see --enable-path-for-scripts=PREFIX in section 2 and the
older alternative method described in section 3.2 of this file.
If tests other than test_scripts.sh fail, a likely reason is that If tests other than test_scripts.sh fail, a likely reason is that
libtool links the test programs against an installed version of libtool links the test programs against an installed version of

View File

@ -1,8 +1,8 @@
Installation Instructions Installation Instructions
************************* *************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Foundation, Inc.
Copying and distribution of this file, with or without modification, Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright are permitted in any medium without royalty provided the copyright
@ -12,97 +12,96 @@ without warranty of any kind.
Basic Installation Basic Installation
================== ==================
Briefly, the shell commands `./configure; make; make install' should Briefly, the shell command './configure && make && make install'
configure, build, and install this package. The following should configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for more-detailed instructions are generic; see the 'README' file for
instructions specific to this package. Some packages provide this instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented 'INSTALL' file but do not implement all of the features documented
below. The lack of an optional feature in a given package is not below. The lack of an optional feature in a given package is not
necessarily a bug. More recommendations for GNU packages can be found necessarily a bug. More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions. in *note Makefile Conventions: (standards)Makefile Conventions.
The `configure' shell script attempts to guess correct values for The 'configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package. those values to create a 'Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent It may also create one or more '.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that definitions. Finally, it creates a shell script 'config.status' that
you can run in the future to recreate the current configuration, and a you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for file 'config.log' containing compiler output (useful mainly for
debugging `configure'). debugging 'configure').
It can also use an optional file (typically called `config.cache' It can also use an optional file (typically called 'config.cache' and
and enabled with `--cache-file=config.cache' or simply `-C') that saves enabled with '--cache-file=config.cache' or simply '-C') that saves the
the results of its tests to speed up reconfiguring. Caching is results of its tests to speed up reconfiguring. Caching is disabled by
disabled by default to prevent problems with accidental use of stale default to prevent problems with accidental use of stale cache files.
cache files.
If you need to do unusual things to compile the package, please try If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail to figure out how 'configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can diffs or instructions to the address given in the 'README' so they can
be considered for the next release. If you are using the cache, and at be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you some point 'config.cache' contains results you don't want to keep, you
may remove or edit it. may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create The file 'configure.ac' (or 'configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if 'configure' by a program called 'autoconf'. You need 'configure.ac' if
you want to change it or regenerate `configure' using a newer version you want to change it or regenerate 'configure' using a newer version of
of `autoconf'. 'autoconf'.
The simplest way to compile this package is: The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type 1. 'cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. './configure' to configure the package for your system.
Running `configure' might take a while. While running, it prints Running 'configure' might take a while. While running, it prints
some messages telling which features it is checking for. some messages telling which features it is checking for.
2. Type `make' to compile the package. 2. Type 'make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with 3. Optionally, type 'make check' to run any self-tests that come with
the package, generally using the just-built uninstalled binaries. the package, generally using the just-built uninstalled binaries.
4. Type `make install' to install the programs and any data files and 4. Type 'make install' to install the programs and any data files and
documentation. When installing into a prefix owned by root, it is documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular recommended that the package be configured and built as a regular
user, and only the `make install' phase executed with root user, and only the 'make install' phase executed with root
privileges. privileges.
5. Optionally, type `make installcheck' to repeat any self-tests, but 5. Optionally, type 'make installcheck' to repeat any self-tests, but
this time using the binaries in their final installed location. this time using the binaries in their final installed location.
This target does not install anything. Running this target as a This target does not install anything. Running this target as a
regular user, particularly if the prior `make install' required regular user, particularly if the prior 'make install' required
root privileges, verifies that the installation completed root privileges, verifies that the installation completed
correctly. correctly.
6. You can remove the program binaries and object files from the 6. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the source code directory by typing 'make clean'. To also remove the
files that `configure' created (so you can compile the package for files that 'configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is a different kind of computer), type 'make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly also a 'make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came all sorts of other programs in order to regenerate files that came
with the distribution. with the distribution.
7. Often, you can also type `make uninstall' to remove the installed 7. Often, you can also type 'make uninstall' to remove the installed
files again. In practice, not all packages have tested that files again. In practice, not all packages have tested that
uninstallation works correctly, even though it is required by the uninstallation works correctly, even though it is required by the
GNU Coding Standards. GNU Coding Standards.
8. Some packages, particularly those that use Automake, provide `make 8. Some packages, particularly those that use Automake, provide 'make
distcheck', which can by used by developers to test that all other distcheck', which can by used by developers to test that all other
targets like `make install' and `make uninstall' work correctly. targets like 'make install' and 'make uninstall' work correctly.
This target is generally not run by end users. This target is generally not run by end users.
Compilers and Options Compilers and Options
===================== =====================
Some systems require unusual options for compilation or linking that Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help' the 'configure' script does not know about. Run './configure --help'
for details on some of the pertinent environment variables. for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters You can give 'configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here by setting variables in the command line or in the environment. Here is
is an example: an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix ./configure CC=c99 CFLAGS=-g LIBS=-lposix
@ -113,21 +112,21 @@ Compiling For Multiple Architectures
You can compile the package for more than one kind of computer at the You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the own directory. To do this, you can use GNU 'make'. 'cd' to the
directory where you want the object files and executables to go and run directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the the 'configure' script. 'configure' automatically checks for the source
source code in the directory that `configure' is in and in `..'. This code in the directory that 'configure' is in and in '..'. This is known
is known as a "VPATH" build. as a "VPATH" build.
With a non-GNU `make', it is safer to compile the package for one With a non-GNU 'make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before installed the package for one architecture, use 'make distclean' before
reconfiguring for another architecture. reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the "universal" binaries--by specifying multiple '-arch' options to the
compiler but only a single `-arch' option to the preprocessor. Like compiler but only a single '-arch' option to the preprocessor. Like
this: this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
@ -136,100 +135,104 @@ this:
This is not guaranteed to produce working output in all cases, you This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems. using the 'lipo' tool if you have problems.
Installation Names Installation Names
================== ==================
By default, `make install' installs the package's commands under By default, 'make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You '/usr/local/bin', include files under '/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving can specify an installation prefix other than '/usr/local' by giving
`configure' the option `--prefix=PREFIX', where PREFIX must be an 'configure' the option '--prefix=PREFIX', where PREFIX must be an
absolute file name. absolute file name.
You can specify separate installation prefixes for You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
PREFIX as the prefix for installing programs and libraries. PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix. Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular options like '--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories kinds of files. Run 'configure --help' for a list of the directories
you can set and what kinds of files go in them. In general, the you can set and what kinds of files go in them. In general, the default
default for these options is expressed in terms of `${prefix}', so that for these options is expressed in terms of '${prefix}', so that
specifying just `--prefix' will affect all of the other directory specifying just '--prefix' will affect all of the other directory
specifications that were not explicitly provided. specifications that were not explicitly provided.
The most portable way to affect installation locations is to pass the The most portable way to affect installation locations is to pass the
correct locations to `configure'; however, many packages provide one or correct locations to 'configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the both of the following shortcuts of passing variable assignments to the
`make install' command line to change installation locations without 'make install' command line to change installation locations without
having to reconfigure or recompile. having to reconfigure or recompile.
The first method involves providing an override variable for each The first method involves providing an override variable for each
affected directory. For example, `make install affected directory. For example, 'make install
prefix=/alternate/directory' will choose an alternate location for all prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of directory configuration variables that were expressed in terms of
`${prefix}'. Any directories that were specified during `configure', '${prefix}'. Any directories that were specified during 'configure',
but not in terms of `${prefix}', must each be overridden at install but not in terms of '${prefix}', must each be overridden at install time
time for the entire installation to be relocated. The approach of for the entire installation to be relocated. The approach of makefile
makefile variable overrides for each directory variable is required by variable overrides for each directory variable is required by the GNU
the GNU Coding Standards, and ideally causes no recompilation. Coding Standards, and ideally causes no recompilation. However, some
However, some platforms have known limitations with the semantics of platforms have known limitations with the semantics of shared libraries
shared libraries that end up requiring recompilation when using this that end up requiring recompilation when using this method, particularly
method, particularly noticeable in packages that use GNU Libtool. noticeable in packages that use GNU Libtool.
The second method involves providing the `DESTDIR' variable. For The second method involves providing the 'DESTDIR' variable. For
example, `make install DESTDIR=/alternate/directory' will prepend example, 'make install DESTDIR=/alternate/directory' will prepend
`/alternate/directory' before all installation names. The approach of '/alternate/directory' before all installation names. The approach of
`DESTDIR' overrides is not required by the GNU Coding Standards, and 'DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand, does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even it does better at avoiding recompilation issues, and works well even
when some directory options were not specified in terms of `${prefix}' when some directory options were not specified in terms of '${prefix}'
at `configure' time. at 'configure' time.
Optional Features Optional Features
================= =================
If the package supports it, you can cause programs to be installed If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the with an extra prefix or suffix on their names by giving 'configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
Some packages pay attention to `--enable-FEATURE' options to Some packages pay attention to '--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package. 'configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE They may also pay attention to '--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The is something like 'gnu-as' or 'x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the 'README' should mention any '--enable-' and '--with-' options that the
package recognizes. package recognizes.
For packages that use the X Window System, `configure' can usually For packages that use the X Window System, 'configure' can usually
find the X include and library files automatically, but if it doesn't, find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and you can use the 'configure' options '--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations. '--x-libraries=DIR' to specify their locations.
Some packages offer the ability to configure how verbose the Some packages offer the ability to configure how verbose the
execution of `make' will be. For these packages, running `./configure execution of 'make' will be. For these packages, running './configure
--enable-silent-rules' sets the default to minimal output, which can be --enable-silent-rules' sets the default to minimal output, which can be
overridden with `make V=1'; while running `./configure overridden with 'make V=1'; while running './configure
--disable-silent-rules' sets the default to verbose, which can be --disable-silent-rules' sets the default to verbose, which can be
overridden with `make V=0'. overridden with 'make V=0'.
Particular systems Particular systems
================== ==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
CC is not installed, it is recommended to use the following options in is not installed, it is recommended to use the following options in
order to use an ANSI C compiler: order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500" ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX. and if that doesn't work, install pre-built binaries of GCC for HP-UX.
HP-UX 'make' updates targets which have the same time stamps as their
prerequisites, which makes it generally unusable when shipped generated
files such as 'configure' are involved. Use GNU 'make' instead.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `<wchar.h>' header file. The option `-nodtk' can be used as parse its '<wchar.h>' header file. The option '-nodtk' can be used as a
a workaround. If GNU CC is not installed, it is therefore recommended workaround. If GNU CC is not installed, it is therefore recommended to
to try try
./configure CC="cc" ./configure CC="cc"
@ -237,26 +240,26 @@ and if that doesn't work, try
./configure CC="cc -nodtk" ./configure CC="cc -nodtk"
On Solaris, don't put `/usr/ucb' early in your `PATH'. This On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
directory contains several dysfunctional programs; working variants of directory contains several dysfunctional programs; working variants of
these programs are available in `/usr/bin'. So, if you need `/usr/ucb' these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
in your `PATH', put it _after_ `/usr/bin'. in your 'PATH', put it _after_ '/usr/bin'.
On Haiku, software installed for all users goes in `/boot/common', On Haiku, software installed for all users goes in '/boot/common',
not `/usr/local'. It is recommended to use the following options: not '/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common ./configure --prefix=/boot/common
Specifying the System Type Specifying the System Type
========================== ==========================
There may be some features `configure' cannot figure out There may be some features 'configure' cannot figure out
automatically, but needs to determine by the type of machine the package automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints _same_ architectures, 'configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system '--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form: type, such as 'sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM CPU-COMPANY-SYSTEM
@ -265,101 +268,101 @@ where SYSTEM can have one of these forms:
OS OS
KERNEL-OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If See the file 'config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't 'config.sub' isn't included in this package, then this package doesn't
need to know the machine type. need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will use the option '--target=TYPE' to select the type of system they will
produce code for. produce code for.
If you want to _use_ a cross compiler, that generates code for a If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will "host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'. eventually be run) with '--host=TYPE'.
Sharing Defaults Sharing Defaults
================ ================
If you want to set default values for `configure' scripts to share, If you want to set default values for 'configure' scripts to share,
you can create a site shell script called `config.site' that gives you can create a site shell script called 'config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'. default values for variables like 'CC', 'cache_file', and 'prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then 'configure' looks for 'PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the 'PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script. 'CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script. A warning: not all 'configure' scripts look for a site script.
Defining Variables Defining Variables
================== ==================
Variables not defined in a site shell script can be set in the Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run environment passed to 'configure'. However, some packages may run
configure again during the build, and the customized values of these configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example: them in the 'configure' command line, using 'VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc ./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is causes the specified 'gcc' to be used as the C compiler (unless it is
overridden in the site shell script). overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
an Autoconf bug. Until the bug is fixed you can use this workaround: Autoconf limitation. Until the limitation is lifted, you can use this
workaround:
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation 'configure' Invocation
====================== ======================
`configure' recognizes the following options to control how it 'configure' recognizes the following options to control how it
operates. operates.
`--help' '--help'
`-h' '-h'
Print a summary of all of the options to `configure', and exit. Print a summary of all of the options to 'configure', and exit.
`--help=short' '--help=short'
`--help=recursive' '--help=recursive'
Print a summary of the options unique to this package's Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used 'configure', and exit. The 'short' variant lists options used only
only in the top level, while the `recursive' variant lists options in the top level, while the 'recursive' variant lists options also
also present in any nested packages. present in any nested packages.
`--version' '--version'
`-V' '-V'
Print the version of Autoconf used to generate the `configure' Print the version of Autoconf used to generate the 'configure'
script, and exit. script, and exit.
`--cache-file=FILE' '--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE, Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to traditionally 'config.cache'. FILE defaults to '/dev/null' to
disable caching. disable caching.
`--config-cache' '--config-cache'
`-C' '-C'
Alias for `--cache-file=config.cache'. Alias for '--cache-file=config.cache'.
`--quiet' '--quiet'
`--silent' '--silent'
`-q' '-q'
Do not print messages saying which checks are being made. To Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error suppress all normal output, redirect it to '/dev/null' (any error
messages will still be shown). messages will still be shown).
`--srcdir=DIR' '--srcdir=DIR'
Look for the package's source code in directory DIR. Usually Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically. 'configure' can determine that directory automatically.
`--prefix=DIR' '--prefix=DIR'
Use DIR as the installation prefix. *note Installation Names:: Use DIR as the installation prefix. *note Installation Names:: for
for more details, including other options available for fine-tuning more details, including other options available for fine-tuning the
the installation locations. installation locations.
`--no-create' '--no-create'
`-n' '-n'
Run the configure checks, but stop before creating any output Run the configure checks, but stop before creating any output
files. files.
`configure' also accepts some other, not widely useful, options. Run 'configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details. 'configure --help' for more details.

View File

@ -47,6 +47,7 @@ dist_examplesold_DATA = \
endif endif
EXTRA_DIST = \ EXTRA_DIST = \
po4a \
extra \ extra \
dos \ dos \
windows \ windows \
@ -77,7 +78,8 @@ manfiles = \
# Convert the man pages to PDF and plain text (ASCII only) formats. # Convert the man pages to PDF and plain text (ASCII only) formats.
dist-hook: dist-hook:
if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \ if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
( cd "$(srcdir)" && git log --date=iso --stat ) \ ( cd "$(srcdir)" && git log --date=iso --stat \
b667a3ef6338a2c1db7b7706b1f6c99ea392221c^..HEAD ) \
> "$(distdir)/ChangeLog"; \ > "$(distdir)/ChangeLog"; \
fi fi
if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \ if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \
@ -98,8 +100,11 @@ dist-hook:
fi fi
# This works with GNU tar and gives cleaner package than normal 'make dist'. # This works with GNU tar and gives cleaner package than normal 'make dist'.
# This also ensures that the man page translations are up to date (dist-hook
# would be too late for that).
mydist: mydist:
sh "$(srcdir)/src/liblzma/validate_map.sh" sh "$(srcdir)/src/liblzma/validate_map.sh"
cd "$(srcdir)/po4a" && sh update-po
VERSION=$(VERSION); \ VERSION=$(VERSION); \
if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \ if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \ SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \

192
NEWS
View File

@ -2,6 +2,195 @@
XZ Utils Release Notes XZ Utils Release Notes
====================== ======================
5.2.5 (2020-03-17)
* liblzma:
- Fixed several C99/C11 conformance bugs. Now the code is clean
under gcc/clang -fsanitize=undefined. Some of these changes
might have a negative effect on performance with old GCC
versions or compilers other than GCC and Clang. The configure
option --enable-unsafe-type-punning can be used to (mostly)
restore the old behavior but it shouldn't normally be used.
- Improved API documentation of lzma_properties_decode().
- Added a very minor encoder speed optimization.
* xz:
- Fixed a crash in "xz -dcfv not_an_xz_file". All four options
were required to trigger it. The crash occurred in the
progress indicator code when xz was in passthru mode where
xz works like "cat".
- Fixed an integer overflow with 32-bit off_t. It could happen
when decompressing a file that has a long run of zero bytes
which xz would try to write as a sparse file. Since the build
system enables large file support by default, off_t is
normally 64-bit even on 32-bit systems.
- Fixes for --flush-timeout:
* Fix semi-busy-waiting.
* Avoid unneeded flushes when no new input has arrived
since the previous flush was completed.
- Added a special case for 32-bit xz: If --memlimit-compress is
used to specify a limit that exceeds 4020 MiB, the limit will
be set to 4020 MiB. The values "0" and "max" aren't affected
by this and neither is decompression. This hack can be
helpful when a 32-bit xz has access to 4 GiB address space
but the specified memlimit exceeds 4 GiB. This can happen
e.g. with some scripts.
- Capsicum sandbox is now enabled by default where available
(FreeBSD >= 10). The sandbox debug messages (xz -vv) were
removed since they seemed to be more annoying than useful.
- DOS build now requires DJGPP 2.05 instead of 2.04beta.
A workaround for a locale problem with DJGPP 2.05 was added.
* xzgrep and other scripts:
- Added a configure option --enable-path-for-scripts=PREFIX.
It is disabled by default except on Solaris where the default
is /usr/xpg4/bin. See INSTALL for details.
- Added a workaround for a POSIX shell detection problem on
Solaris.
* Build systems:
- Added preliminary build instructions for z/OS. See INSTALL
section 1.2.9.
- Experimental CMake support was added. It should work to build
static liblzma on a few operating systems. It may or may not
work to build shared liblzma. On some platforms it can build
xz and xzdec too but those are only for testing. See the
comment in the beginning of CMakeLists.txt for details.
- Visual Studio project files were updated.
WindowsTargetPlatformVersion was removed from VS2017 files
and set to "10.0" in the added VS2019 files. In the future
the VS project files will be removed when CMake support is
good enough.
- New #defines in config.h: HAVE___BUILTIN_ASSUME_ALIGNED,
HAVE___BUILTIN_BSWAPXX, and TUKLIB_USE_UNSAFE_TYPE_PUNNING.
- autogen.sh has a new optional dependency on po4a and a new
option --no-po4a to skip that step. This matters only if one
wants to remake the build files. po4a is used to update the
translated man pages but as long as the man pages haven't
been modified, there's nothing to update and one can use
--no-po4a to avoid the dependency on po4a.
* Translations:
- XZ Utils translations are now handled by the Translation
Project: https://translationproject.org/domain/xz.html
- All man pages are now included in German too.
- New xz translations: Brazilian Portuguese, Finnish,
Hungarian, Chinese (simplified), Chinese (traditional),
and Danish (partial translation)
- Updated xz translations: French, German, Italian, and Polish
- Unfortunately a few new xz translations weren't included due
to technical problems like too long lines in --help output or
misaligned column headings in tables. In the future, many of
these strings will be split and e.g. the table column
alignment will be handled in software. This should make the
strings easier to translate.
5.2.4 (2018-04-29)
* liblzma:
- Allow 0 as memory usage limit instead of returning
LZMA_PROG_ERROR. Now 0 is treated as if 1 byte was specified,
which effectively is the same as 0.
- Use "noexcept" keyword instead of "throw()" in the public
headers when a C++11 (or newer standard) compiler is used.
- Added a portability fix for recent Intel C Compilers.
- Microsoft Visual Studio build files have been moved under
windows/vs2013 and windows/vs2017.
* xz:
- Fix "xz --list --robot missing_or_bad_file.xz" which would
try to print an uninitialized string and thus produce garbage
output. Since the exit status is non-zero, most uses of such
a command won't try to interpret the garbage output.
- "xz --list foo.xz" could print "Internal error (bug)" in a
corner case where a specific memory usage limit had been set.
5.2.3 (2016-12-30)
* xz:
- Always close a file before trying to delete it to avoid
problems on some operating system and file system combinations.
- Fixed copying of file timestamps on Windows.
- Added experimental (disabled by default) sandbox support using
Capsicum (FreeBSD >= 10). See --enable-sandbox in INSTALL.
* C99/C11 conformance fixes to liblzma. The issues affected at least
some builds using link-time optimizations.
* Fixed bugs in the rarely-used function lzma_index_dup().
* Use of external SHA-256 code is now disabled by default.
It can still be enabled by passing --enable-external-sha256
to configure. The reasons to disable it by default (see INSTALL
for more details):
- Some OS-specific SHA-256 implementations conflict with
OpenSSL and cause problems in programs that link against both
liblzma and libcrypto. At least FreeBSD 10 and MINIX 3.3.0
are affected.
- The internal SHA-256 is faster than the SHA-256 code in
some operating systems.
* Changed CPU core count detection to use sched_getaffinity() on
GNU/Linux and GNU/kFreeBSD.
* Fixes to the build-system and xz to make xz buildable even when
encoders, decoders, or threading have been disabled from libilzma
using configure options. These fixes added two new #defines to
config.h: HAVE_ENCODERS and HAVE_DECODERS.
5.2.2 (2015-09-29)
* Fixed bugs in QNX-specific code.
* Omitted the use of pipe2() even if it is available to avoid
portability issues with some old Linux and glibc combinations.
* Updated German translation.
* Added project files to build static and shared liblzma (not the
whole XZ Utils) with Visual Studio 2013 update 2 or later.
* Documented that threaded decompression hasn't been implemented
yet. A 5.2.0 NEWS entry describing multi-threading support had
incorrectly said "decompression" when it should have said
"compression".
5.2.1 (2015-02-26) 5.2.1 (2015-02-26)
* Fixed a compression-ratio regression in fast mode of LZMA1 and * Fixed a compression-ratio regression in fast mode of LZMA1 and
@ -66,8 +255,9 @@ XZ Utils Release Notes
is non-trivial, so as of writing it is unknown if it will be is non-trivial, so as of writing it is unknown if it will be
backported to the v5.0 branch. backported to the v5.0 branch.
- Multi-threaded decompression can be enabled with the - Multi-threaded compression can be enabled with the
--threads (-T) option. --threads (-T) option.
[Fixed: This originally said "decompression".]
- New command line options in xz: --single-stream, - New command line options in xz: --single-stream,
--block-size=SIZE, --block-list=SIZES, --block-size=SIZE, --block-list=SIZES,

116
README
View File

@ -9,7 +9,7 @@ XZ Utils
1.3. Documentation for liblzma 1.3. Documentation for liblzma
2. Version numbering 2. Version numbering
3. Reporting bugs 3. Reporting bugs
4. Translating the xz tool 4. Translations
5. Other implementations of the .xz format 5. Other implementations of the .xz format
6. Contact information 6. Contact information
@ -55,9 +55,11 @@ XZ Utils
Similarly, it is possible that some day there is a filter that will Similarly, it is possible that some day there is a filter that will
compress better than LZMA2. compress better than LZMA2.
XZ Utils doesn't support multithreaded compression or decompression XZ Utils supports multithreaded compression. XZ Utils doesn't support
yet. It has been planned though and taken into account when designing multithreaded decompression yet. It has been planned though and taken
the .xz file format. into account when designing the .xz file format. In the future, files
that were created in threaded mode can be decompressed in threaded
mode too.
1. Documentation 1. Documentation
@ -103,14 +105,13 @@ XZ Utils
and data type as Doxygen tags. These docs should be quite OK as and data type as Doxygen tags. These docs should be quite OK as
a quick reference. a quick reference.
I have planned to write a bunch of very well documented example There are a few example/tutorial programs that should help in
programs, which (due to comments) should work as a tutorial to getting started with liblzma. In the source package the examples
various features of liblzma. No such example programs have been are in "doc/examples" and in binary packages they may be under
written yet. "examples" in the same directory as this README.
For now, if you have never used liblzma, libbzip2, or zlib, I Since the liblzma API has similarities to the zlib API, some people
recommend learning the *basics* of the zlib API. Once you know that, may find it useful to read the zlib docs and tutorial too:
it should be easier to learn liblzma.
http://zlib.net/manual.html http://zlib.net/manual.html
http://zlib.net/zlib_how.html http://zlib.net/zlib_how.html
@ -192,91 +193,18 @@ XZ Utils
system. system.
4. Translating the xz tool 4. Translations
-------------------------- ---------------
The messages from the xz tool have been translated into a few The xz command line tool and all man pages can be translated.
languages. Before starting to translate into a new language, ask The translations are handled via the Translation Project. If you
the author whether someone else hasn't already started working on it. wish to help translating xz, please join the Translation Project:
Test your translation. Testing includes comparing the translated https://translationproject.org/html/translators.html
output to the original English version by running the same commands
in both your target locale and with LC_ALL=C. Ask someone to
proof-read and test the translation.
Testing can be done e.g. by installing xz into a temporary directory: Several strings will change in a future version of xz so if you
wish to start a new translation, look at the code in the xz git
./configure --disable-shared --prefix=/tmp/xz-test repostiory instead of a 5.2.x release.
# <Edit the .po file in the po directory.>
make -C po update-po
make install
bash debug/translation.bash | less
bash debug/translation.bash | less -S # For --list outputs
Repeat the above as needed (no need to re-run configure though).
Note especially the following:
- The output of --help and --long-help must look nice on
an 80-column terminal. It's OK to add extra lines if needed.
- In contrast, don't add extra lines to error messages and such.
They are often preceded with e.g. a filename on the same line,
so you have no way to predict where to put a \n. Let the terminal
do the wrapping even if it looks ugly. Adding new lines will be
even uglier in the generic case even if it looks nice in a few
limited examples.
- Be careful with column alignment in tables and table-like output
(--list, --list --verbose --verbose, --info-memory, --help, and
--long-help):
* All descriptions of options in --help should start in the
same column (but it doesn't need to be the same column as
in the English messages; just be consistent if you change it).
Check that both --help and --long-help look OK, since they
share several strings.
* --list --verbose and --info-memory print lines that have
the format "Description: %s". If you need a longer
description, you can put extra space between the colon
and %s. Then you may need to add extra space to other
strings too so that the result as a whole looks good (all
values start at the same column).
* The columns of the actual tables in --list --verbose --verbose
should be aligned properly. Abbreviate if necessary. It might
be good to keep at least 2 or 3 spaces between column headings
and avoid spaces in the headings so that the columns stand out
better, but this is a matter of opinion. Do what you think
looks best.
- Be careful to put a period at the end of a sentence when the
original version has it, and don't put it when the original
doesn't have it. Similarly, be careful with \n characters
at the beginning and end of the strings.
- Read the TRANSLATORS comments that have been extracted from the
source code and included in xz.pot. If they suggest testing the
translation with some type of command, do it. If testing needs
input files, use e.g. tests/files/good-*.xz.
- When updating the translation, read the fuzzy (modified) strings
carefully, and don't mark them as updated before you actually
have updated them. Reading through the unchanged messages can be
good too; sometimes you may find a better wording for them.
- If you find language problems in the original English strings,
feel free to suggest improvements. Ask if something is unclear.
- The translated messages should be understandable (sometimes this
may be a problem with the original English messages too). Don't
make a direct word-by-word translation from English especially if
the result doesn't sound good in your language.
In short, take your time and pay attention to the details. Making
a good translation is not a quick and trivial thing to do. The
translated xz should look as polished as the English version.
5. Other implementations of the .xz format 5. Other implementations of the .xz format
@ -291,7 +219,7 @@ XZ Utils
XZ Embedded is a limited implementation written for use in the Linux XZ Embedded is a limited implementation written for use in the Linux
kernel, but it is also suitable for other embedded use. kernel, but it is also suitable for other embedded use.
http://tukaani.org/xz/embedded.html https://tukaani.org/xz/embedded.html
6. Contact information 6. Contact information

21
THANKS
View File

@ -11,7 +11,9 @@ has been important. :-) In alphabetical order:
- Karl Berry - Karl Berry
- Anders F. Björklund - Anders F. Björklund
- Emmanuel Blot - Emmanuel Blot
- Melanie Blower
- Martin Blumenstingl - Martin Blumenstingl
- Ben Boeckel
- Jakub Bogusz - Jakub Bogusz
- Maarten Bosmans - Maarten Bosmans
- Trent W. Buck - Trent W. Buck
@ -21,6 +23,8 @@ has been important. :-) In alphabetical order:
- Milo Casagrande - Milo Casagrande
- Marek Černocký - Marek Černocký
- Tomer Chachamu - Tomer Chachamu
- Antoine Cœur
- Gabi Davar
- Chris Donawa - Chris Donawa
- Andrew Dudman - Andrew Dudman
- Markus Duft - Markus Duft
@ -29,6 +33,7 @@ has been important. :-) In alphabetical order:
- Gilles Espinasse - Gilles Espinasse
- Denis Excoffier - Denis Excoffier
- Michael Felt - Michael Felt
- Michael Fox
- Mike Frysinger - Mike Frysinger
- Daniel Richard G. - Daniel Richard G.
- Bill Glessner - Bill Glessner
@ -41,6 +46,7 @@ has been important. :-) In alphabetical order:
- Peter Ivanov - Peter Ivanov
- Jouk Jansen - Jouk Jansen
- Jun I Jin - Jun I Jin
- Kiyoshi Kanazawa
- Per Øyvind Karlsen - Per Øyvind Karlsen
- Thomas Klausner - Thomas Klausner
- Richard Koch - Richard Koch
@ -54,24 +60,31 @@ has been important. :-) In alphabetical order:
- Andraž 'ruskie' Levstik - Andraž 'ruskie' Levstik
- Cary Lewis - Cary Lewis
- Wim Lewis - Wim Lewis
- Xin Li
- Eric Lindblad
- Lorenzo De Liso - Lorenzo De Liso
- Bela Lubkin - Bela Lubkin
- Gregory Margo - Gregory Margo
- Julien Marrec
- Martin Matuška
- Jim Meyering - Jim Meyering
- Arkadiusz Miskiewicz - Arkadiusz Miskiewicz
- Conley Moorhous - Conley Moorhous
- Rafał Mużyło - Rafał Mużyło
- Adrien Nader - Adrien Nader
- Evan Nemerson
- Hongbo Ni - Hongbo Ni
- Jonathan Nieder - Jonathan Nieder
- Andre Noll - Andre Noll
- Peter O'Gorman - Peter O'Gorman
- Filip Palian
- Peter Pallinger - Peter Pallinger
- Rui Paulo - Rui Paulo
- Igor Pavlov - Igor Pavlov
- Diego Elio Pettenò - Diego Elio Pettenò
- Elbert Pol - Elbert Pol
- Mikko Pouru - Mikko Pouru
- Rich Prohaska
- Trần Ngọc Quân - Trần Ngọc Quân
- Pavel Raiskup - Pavel Raiskup
- Ole André Vadla Ravnås - Ole André Vadla Ravnås
@ -85,20 +98,28 @@ has been important. :-) In alphabetical order:
- Alexandre Sauvé - Alexandre Sauvé
- Benno Schulenberg - Benno Schulenberg
- Andreas Schwab - Andreas Schwab
- Bhargava Shastry
- Dan Shechter - Dan Shechter
- Stuart Shelton - Stuart Shelton
- Sebastian Andrzej Siewior
- Brad Smith - Brad Smith
- Bruce Stark
- Pippijn van Steenhoven
- Jonathan Stott - Jonathan Stott
- Dan Stromberg - Dan Stromberg
- Vincent Torri - Vincent Torri
- Paul Townsend - Paul Townsend
- Mohammed Adnène Trojette - Mohammed Adnène Trojette
- Alexey Tourbin - Alexey Tourbin
- Loganaden Velvindron
- Patrick J. Volkerding - Patrick J. Volkerding
- Martin Väth - Martin Väth
- Adam Walling
- Jeffrey Walton
- Christian Weisgerber - Christian Weisgerber
- Bert Wesarg - Bert Wesarg
- Fredrik Wikstrom - Fredrik Wikstrom
- Jim Wilcoxson
- Ralf Wildenhues - Ralf Wildenhues
- Charles Wilson - Charles Wilson
- Lars Wirzenius - Lars Wirzenius

View File

@ -9,14 +9,25 @@
# #
############################################################################### ###############################################################################
# The result of using "autoreconf -fi" should be identical to using this
# script. I'm leaving this script here just in case someone finds it useful.
set -e -x set -e -x
# The following six lines are almost identical to "autoreconf -fi" but faster.
${AUTOPOINT:-autopoint} -f ${AUTOPOINT:-autopoint} -f
${LIBTOOLIZE:-libtoolize} -c -f || glibtoolize -c -f ${LIBTOOLIZE:-libtoolize} -c -f || glibtoolize -c -f
${ACLOCAL:-aclocal} -I m4 ${ACLOCAL:-aclocal} -I m4
${AUTOCONF:-autoconf} ${AUTOCONF:-autoconf}
${AUTOHEADER:-autoheader} ${AUTOHEADER:-autoheader}
${AUTOMAKE:-automake} -acf --foreign ${AUTOMAKE:-automake} -acf --foreign
# Generate the translated man pages if the "po4a" tool is available.
# This is *NOT* done by "autoreconf -fi" or when "make" is run.
#
# Pass --no-po4a to this script to skip this step. It can be useful when
# you know that po4a isn't available and don't want autogen.sh to exit
# with non-zero exit status.
if test "x$1" != "x--no-po4a"; then
cd po4a
sh update-po
fi
exit 0

49
cmake/tuklib_common.cmake Normal file
View File

@ -0,0 +1,49 @@
#
# tuklib_common.cmake - common functions and macros for tuklib_*.cmake files
#
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
function(tuklib_add_definitions TARGET_OR_ALL DEFINITIONS)
# DEFINITIONS may be an empty string/list but it's fine here. There is
# no need to quote ${DEFINITIONS} as empty arguments are fine here.
if(TARGET_OR_ALL STREQUAL "ALL")
add_compile_definitions(${DEFINITIONS})
else()
target_compile_definitions("${TARGET_OR_ALL}" PRIVATE ${DEFINITIONS})
endif()
endfunction()
function(tuklib_add_definition_if TARGET_OR_ALL VAR)
if(${VAR})
tuklib_add_definitions("${TARGET_OR_ALL}" "${VAR}")
endif()
endfunction()
# This is an over-simplified version of AC_USE_SYSTEM_EXTENSIONS in Autoconf
# or gl_USE_SYSTEM_EXTENSIONS in gnulib.
macro(tuklib_use_system_extensions TARGET_OR_ALL)
if(NOT WIN32)
# FIXME? The Solaris-specific __EXTENSIONS__ should be conditional
# even on Solaris. See gnulib: git log m4/extensions.m4.
# FIXME? gnulib and autoconf.git has lots of new stuff.
tuklib_add_definitions("${TARGET_OR_ALL}"
_GNU_SOURCE
__EXTENSIONS__
_POSIX_PTHREAD_SEMANTICS
_TANDEM_SOURCE
_ALL_SOURCE
)
list(APPEND CMAKE_REQUIRED_DEFINITIONS
-D_GNU_SOURCE
-D__EXTENSIONS__
-D_POSIX_PTHREAD_SEMANTICS
-D_TANDEM_SOURCE
-D_ALL_SOURCE
)
endif()
endmacro()

175
cmake/tuklib_cpucores.cmake Normal file
View File

@ -0,0 +1,175 @@
#
# tuklib_cpucores.cmake - see tuklib_cpucores.m4 for description and comments
#
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
include(CheckCSourceCompiles)
include(CheckIncludeFile)
function(tuklib_cpucores_internal_check)
if(WIN32 OR CYGWIN)
# Nothing to do, the tuklib_cpucores.c handles it.
set(TUKLIB_CPUCORES_DEFINITIONS "" CACHE INTERNAL "")
return()
endif()
# glibc-based systems (GNU/Linux and GNU/kFreeBSD) have
# sched_getaffinity(). The CPU_COUNT() macro was added in glibc 2.9.
# glibc 2.9 is old enough that if someone uses the code on older glibc,
# the fallback to sysconf() should be good enough.
#
# NOTE: This required that _GNU_SOURCE is defined. We assume that whatever
# feature test macros the caller wants to use are already set in
# CMAKE_REQUIRED_DEFINES and in the target defines.
check_c_source_compiles("
#include <sched.h>
int main(void)
{
cpu_set_t cpu_mask;
sched_getaffinity(0, sizeof(cpu_mask), &cpu_mask);
return CPU_COUNT(&cpu_mask);
}
"
TUKLIB_CPUCORES_SCHED_GETAFFINITY)
if(TUKLIB_CPUCORES_SCHED_GETAFFINITY)
set(TUKLIB_CPUCORES_DEFINITIONS
"TUKLIB_CPUCORES_SCHED_GETAFFINITY"
CACHE INTERNAL "")
return()
endif()
# FreeBSD has both cpuset and sysctl. Look for cpuset first because
# it's a better approach.
#
# This test would match on GNU/kFreeBSD too but it would require
# -lfreebsd-glue when linking and thus in the current form this would
# fail on GNU/kFreeBSD. The above test for sched_getaffinity() matches
# on GNU/kFreeBSD so the test below should never run on that OS.
check_c_source_compiles("
#include <sys/param.h>
#include <sys/cpuset.h>
int main(void)
{
cpuset_t set;
cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1,
sizeof(set), &set);
return 0;
}
"
TUKLIB_CPUCORES_CPUSET)
if(TUKLIB_CPUCORES_CPUSET)
set(TUKLIB_CPUCORES_DEFINITIONS "HAVE_PARAM_H;TUKLIB_CPUCORES_CPUSET"
CACHE INTERNAL "")
return()
endif()
# On OS/2, both sysconf() and sysctl() pass the tests in this file,
# but only sysctl() works. On QNX it's the opposite: only sysconf() works
# (although it assumes that _POSIX_SOURCE, _XOPEN_SOURCE, and
# _POSIX_C_SOURCE are undefined or alternatively _QNX_SOURCE is defined).
#
# We test sysctl() first and intentionally break the sysctl() test on QNX
# so that sysctl() is never used on QNX.
check_include_file(sys/param.h HAVE_SYS_PARAM_H)
if(HAVE_SYS_PARAM_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_PARAM_H)
endif()
check_c_source_compiles("
#ifdef __QNX__
compile error
#endif
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
#include <sys/sysctl.h>
int main(void)
{
int name[2] = { CTL_HW, HW_NCPU };
int cpus;
size_t cpus_size = sizeof(cpus);
sysctl(name, 2, &cpus, &cpus_size, NULL, 0);
return 0;
}
"
TUKLIB_CPUCORES_SYSCTL)
if(TUKLIB_CPUCORES_SYSCTL)
if(HAVE_SYS_PARAM_H)
set(TUKLIB_CPUCORES_DEFINITIONS
"HAVE_PARAM_H;TUKLIB_CPUCORES_SYSCTL"
CACHE INTERNAL "")
else()
set(TUKLIB_CPUCORES_DEFINITIONS
"TUKLIB_CPUCORES_SYSCTL"
CACHE INTERNAL "")
endif()
return()
endif()
# Many platforms support sysconf().
check_c_source_compiles("
#include <unistd.h>
int main(void)
{
long i;
#ifdef _SC_NPROCESSORS_ONLN
/* Many systems using sysconf() */
i = sysconf(_SC_NPROCESSORS_ONLN);
#else
/* IRIX */
i = sysconf(_SC_NPROC_ONLN);
#endif
return 0;
}
"
TUKLIB_CPUCORES_SYSCONF)
if(TUKLIB_CPUCORES_SYSCONF)
set(TUKLIB_CPUCORES_DEFINITIONS "TUKLIB_CPUCORES_SYSCONF"
CACHE INTERNAL "")
return()
endif()
# HP-UX
check_c_source_compiles("
#include <sys/param.h>
#include <sys/pstat.h>
int main(void)
{
struct pst_dynamic pst;
pstat_getdynamic(&pst, sizeof(pst), 1, 0);
(void)pst.psd_proc_cnt;
return 0;
}
"
TUKLIB_CPUCORES_PSTAT_GETDYNAMIC)
if(TUKLIB_CPUCORES_PSTAT_GETDYNAMIC)
set(TUKLIB_CPUCORES_DEFINITIONS "TUKLIB_CPUCORES_PSTAT_GETDYNAMIC"
CACHE INTERNAL "")
return()
endif()
endfunction()
function(tuklib_cpucores TARGET_OR_ALL)
if(NOT DEFINED CACHE{TUKLIB_CPUCORES_FOUND})
message(STATUS
"Checking how to detect the number of available CPU cores")
tuklib_cpucores_internal_check()
if(DEFINED CACHE{TUKLIB_CPUCORES_DEFINITIONS})
set(TUKLIB_CPUCORES_FOUND 1 CACHE INTERNAL "")
else()
set(TUKLIB_CPUCORES_FOUND 0 CACHE INTERNAL "")
message(WARNING
"No method to detect the number of CPU cores was found")
endif()
endif()
if(TUKLIB_CPUCORES_FOUND)
tuklib_add_definitions("${TARGET_OR_ALL}"
"${TUKLIB_CPUCORES_DEFINITIONS}")
endif()
endfunction()

102
cmake/tuklib_integer.cmake Normal file
View File

@ -0,0 +1,102 @@
#
# tuklib_integer.cmake - see tuklib_integer.m4 for description and comments
#
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
include(TestBigEndian)
include(CheckCSourceCompiles)
include(CheckIncludeFile)
include(CheckSymbolExists)
function(tuklib_integer TARGET_OR_ALL)
# Check for endianness. Unlike the Autoconf's AC_C_BIGENDIAN, this doesn't
# support Apple universal binaries. The CMake module will leave the
# variable unset so we can catch that situation here instead of continuing
# as if we were little endian.
test_big_endian(WORDS_BIGENDIAN)
if(NOT DEFINED WORDS_BIGENDIAN)
message(FATAL_ERROR "Cannot determine endianness")
endif()
tuklib_add_definition_if("${TARGET_OR_ALL}" WORDS_BIGENDIAN)
# Look for a byteswapping method.
check_c_source_compiles("
int main(void)
{
__builtin_bswap16(1);
__builtin_bswap32(1);
__builtin_bswap64(1);
return 0;
}
"
HAVE___BUILTIN_BSWAPXX)
if(HAVE___BUILTIN_BSWAPXX)
tuklib_add_definitions("${TARGET_OR_ALL}" HAVE___BUILTIN_BSWAPXX)
else()
check_include_file(byteswap.h HAVE_BYTESWAP_H)
if(HAVE_BYTESWAP_H)
tuklib_add_definitions("${TARGET_OR_ALL}" HAVE_BYTESWAP_H)
check_symbol_exists(bswap_16 byteswap.h HAVE_BSWAP_16)
tuklib_add_definition_if("${TARGET_OR_ALL}" HAVE_BSWAP_16)
check_symbol_exists(bswap_32 byteswap.h HAVE_BSWAP_32)
tuklib_add_definition_if("${TARGET_OR_ALL}" HAVE_BSWAP_32)
check_symbol_exists(bswap_64 byteswap.h HAVE_BSWAP_64)
tuklib_add_definition_if("${TARGET_OR_ALL}" HAVE_BSWAP_64)
else()
check_include_file(sys/endian.h HAVE_SYS_ENDIAN_H)
if(HAVE_SYS_ENDIAN_H)
tuklib_add_definitions("${TARGET_OR_ALL}" HAVE_SYS_ENDIAN_H)
else()
check_include_file(sys/byteorder.h HAVE_SYS_BYTEORDER_H)
tuklib_add_definition_if("${TARGET_OR_ALL}"
HAVE_SYS_BYTEORDER_H)
endif()
endif()
endif()
# 16-bit and 32-bit unaligned access is fast on x86(-64),
# big endian PowerPC, and usually on 32/64-bit ARM too.
# There are others too and ARM could be a false match.
#
# Guess the default value for the option.
# CMake's ability to give info about the target arch seems bad.
# The the same arch can have different name depending on the OS.
#
# FIXME: The regex is based on guessing, not on factual information!
#
# NOTE: Compared to the Autoconf test, this lacks the GCC/Clang test
# on ARM and always assumes that unaligned is fast on ARM.
set(FAST_UNALIGNED_GUESS OFF)
if(CMAKE_SYSTEM_PROCESSOR MATCHES
"[Xx3456]86|^[Xx]64|^[Aa][Mm][Dd]64|^[Aa][Rr][Mm]|^aarch|^powerpc|^ppc")
if(NOT WORDS_BIGENDIAN OR
NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc|^ppc")
set(FAST_UNALIGNED_GUESS ON)
endif()
endif()
option(TUKLIB_FAST_UNALIGNED_ACCESS
"Enable if the system supports *fast* unaligned memory access \
with 16-bit and 32-bit integers."
"${FAST_UNALIGNED_GUESS}")
tuklib_add_definition_if("${TARGET_OR_ALL}" TUKLIB_FAST_UNALIGNED_ACCESS)
# Unsafe type punning:
option(TUKLIB_USE_UNSAFE_TYPE_PUNNING
"This introduces strict aliasing violations and \
may result in broken code. However, this might improve performance \
in some cases, especially with old compilers \
(e.g. GCC 3 and early 4.x on x86, GCC < 6 on ARMv6 and ARMv7)."
OFF)
tuklib_add_definition_if("${TARGET_OR_ALL}" TUKLIB_USE_UNSAFE_TYPE_PUNNING)
# Check for GCC/Clang __builtin_assume_aligned().
check_c_source_compiles(
"int main(void) { __builtin_assume_aligned(\"\", 1); return 0; }"
HAVE___BUILTIN_ASSUME_ALIGNED)
tuklib_add_definition_if("${TARGET_OR_ALL}" HAVE___BUILTIN_ASSUME_ALIGNED)
endfunction()

20
cmake/tuklib_mbstr.cmake Normal file
View File

@ -0,0 +1,20 @@
#
# tuklib_mbstr.cmake - see tuklib_mbstr.m4 for description and comments
#
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
include(CheckSymbolExists)
function(tuklib_mbstr TARGET_OR_ALL)
check_symbol_exists(mbrtowc wchar.h HAVE_MBRTOWC)
tuklib_add_definition_if("${TARGET_OR_ALL}" HAVE_MBRTOWC)
# NOTE: wcwidth() requires _GNU_SOURCE or _XOPEN_SOURCE on GNU/Linux.
check_symbol_exists(wcwidth wchar.h HAVE_WCWIDTH)
tuklib_add_definition_if("${TARGET_OR_ALL}" HAVE_WCWIDTH)
endfunction()

150
cmake/tuklib_physmem.cmake Normal file
View File

@ -0,0 +1,150 @@
#
# tuklib_physmem.cmake - see tuklib_physmem.m4 for description and comments
#
# NOTE: Compared tuklib_physmem.m4, this lacks support for Tru64, IRIX, and
# Linux sysinfo() (usually sysconf() is used on GNU/Linux).
#
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
include(CheckCSourceCompiles)
include(CheckIncludeFile)
function(tuklib_physmem_internal_check)
# Shortcut on Windows:
if(WIN32 OR CYGWIN)
# Nothing to do, the tuklib_physmem.c handles it.
set(TUKLIB_PHYSMEM_DEFINITIONS "" CACHE INTERNAL "")
return()
endif()
# Full check for special cases:
check_c_source_compiles("
#if defined(_WIN32) || defined(__CYGWIN__) || defined(__OS2__) \
|| defined(__DJGPP__) || defined(__VMS) \
|| defined(AMIGA) || defined(__AROS__) || defined(__QNX__)
int main(void) { return 0; }
#else
compile error
#endif
"
TUKLIB_PHYSMEM_SPECIAL)
if(TUKLIB_PHYSMEM_SPECIAL)
# Nothing to do, the tuklib_physmem.c handles it.
set(TUKLIB_PHYSMEM_DEFINITIONS "" CACHE INTERNAL "")
return()
endif()
# Look for AIX-specific solution before sysconf(), because the test
# for sysconf() will pass on AIX but won't actually work
# (sysconf(_SC_PHYS_PAGES) compiles but always returns -1 on AIX).
check_c_source_compiles("
#include <sys/systemcfg.h>
int main(void)
{
(void)_system_configuration.physmem;
return 0;
}
"
TUKLIB_PHYSMEM_AIX)
if(TUKLIB_PHYSMEM_AIX)
set(TUKLIB_PHYSMEM_DEFINITIONS "TUKLIB_PHYSMEM_AIX" CACHE INTERNAL "")
return()
endif()
# sysconf()
check_c_source_compiles("
#include <unistd.h>
int main(void)
{
long i;
i = sysconf(_SC_PAGESIZE);
i = sysconf(_SC_PHYS_PAGES);
return 0;
}
"
TUKLIB_PHYSMEM_SYSCONF)
if(TUKLIB_PHYSMEM_SYSCONF)
set(TUKLIB_PHYSMEM_DEFINITIONS "TUKLIB_PHYSMEM_SYSCONF"
CACHE INTERNAL "")
return()
endif()
# sysctl()
check_include_file(sys/param.h HAVE_SYS_PARAM_H)
if(HAVE_SYS_PARAM_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_PARAM_H)
endif()
check_c_source_compiles("
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
#include <sys/sysctl.h>
int main(void)
{
int name[2] = { CTL_HW, HW_PHYSMEM };
unsigned long mem;
size_t mem_ptr_size = sizeof(mem);
sysctl(name, 2, &mem, &mem_ptr_size, NULL, 0);
return 0;
}
"
TUKLIB_PHYSMEM_SYSCTL)
if(TUKLIB_PHYSMEM_SYSCTL)
if(HAVE_SYS_PARAM_H)
set(TUKLIB_PHYSMEM_DEFINITIONS
"HAVE_PARAM_H;TUKLIB_PHYSMEM_SYSCTL"
CACHE INTERNAL "")
else()
set(TUKLIB_PHYSMEM_DEFINITIONS
"TUKLIB_PHYSMEM_SYSCTL"
CACHE INTERNAL "")
endif()
return()
endif()
# HP-UX
check_c_source_compiles("
#include <sys/param.h>
#include <sys/pstat.h>
int main(void)
{
struct pst_static pst;
pstat_getstatic(&pst, sizeof(pst), 1, 0);
(void)pst.physical_memory;
(void)pst.page_size;
return 0;
}
"
TUKLIB_PHYSMEM_PSTAT_GETSTATIC)
if(TUKLIB_PHYSMEM_PSTAT_GETSTATIC)
set(TUKLIB_PHYSMEM_DEFINITIONS "TUKLIB_PHYSMEM_PSTAT_GETSTATIC"
CACHE INTERNAL "")
return()
endif()
endfunction()
function(tuklib_physmem TARGET_OR_ALL)
if(NOT DEFINED CACHE{TUKLIB_PHYSMEM_FOUND})
message(STATUS "Checking how to detect the amount of physical memory")
tuklib_physmem_internal_check()
if(DEFINED CACHE{TUKLIB_PHYSMEM_DEFINITIONS})
set(TUKLIB_PHYSMEM_FOUND 1 CACHE INTERNAL "")
else()
set(TUKLIB_PHYSMEM_FOUND 0 CACHE INTERNAL "")
message(WARNING
"No method to detect the amount of physical memory was found")
endif()
endif()
if(TUKLIB_PHYSMEM_FOUND)
tuklib_add_definitions("${TARGET_OR_ALL}"
"${TUKLIB_PHYSMEM_DEFINITIONS}")
endif()
endfunction()

View File

@ -0,0 +1,19 @@
#
# tuklib_progname.cmake - see tuklib_progname.m4 for description and comments
#
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
include(CheckSymbolExists)
function(tuklib_progname TARGET_OR_ALL)
# NOTE: This glibc extension requires _GNU_SOURCE.
check_symbol_exists(program_invocation_name errno.h
HAVE_DECL_PROGRAM_INVOCATION_NAME)
tuklib_add_definition_if("${TARGET_OR_ALL}"
HAVE_DECL_PROGRAM_INVOCATION_NAME)
endfunction()

View File

@ -15,10 +15,10 @@
# of malloc(), stat(), or lstat(), since we don't use those functions in # of malloc(), stat(), or lstat(), since we don't use those functions in
# a way that would cause the problems the autoconf macros check. # a way that would cause the problems the autoconf macros check.
AC_PREREQ([2.64]) AC_PREREQ([2.69])
AC_INIT([XZ Utils], m4_esyscmd([/bin/sh build-aux/version.sh]), AC_INIT([XZ Utils], m4_esyscmd([/bin/sh build-aux/version.sh]),
[lasse.collin@tukaani.org], [xz], [http://tukaani.org/xz/]) [lasse.collin@tukaani.org], [xz], [https://tukaani.org/xz/])
AC_CONFIG_SRCDIR([src/liblzma/common/common.h]) AC_CONFIG_SRCDIR([src/liblzma/common/common.h])
AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
@ -34,8 +34,8 @@ AC_CANONICAL_HOST
# We do some special things on Windows (32-bit or 64-bit) builds. # We do some special things on Windows (32-bit or 64-bit) builds.
case $host_os in case $host_os in
mingw* | cygwin*) is_w32=yes ;; mingw* | cygwin | msys) is_w32=yes ;;
*) is_w32=no ;; *) is_w32=no ;;
esac esac
AM_CONDITIONAL([COND_W32], [test "$is_w32" = yes]) AM_CONDITIONAL([COND_W32], [test "$is_w32" = yes])
@ -43,9 +43,15 @@ AM_CONDITIONAL([COND_W32], [test "$is_w32" = yes])
# executables. Cygwin is an exception to this, since it is recommended # executables. Cygwin is an exception to this, since it is recommended
# that symlinks don't have the .exe suffix. To make this work, we # that symlinks don't have the .exe suffix. To make this work, we
# define LN_EXEEXT. # define LN_EXEEXT.
#
# MSYS2 is treated the same way as Cygwin. It uses plain "msys" like
# the original MSYS when building MSYS/MSYS2-binaries. Hopefully this
# doesn't break things for the original MSYS developers. Note that this
# doesn't affect normal MSYS/MSYS2 users building non-MSYS/MSYS2 binaries
# since in that case the $host_os is usually mingw32.
case $host_os in case $host_os in
cygwin) LN_EXEEXT= ;; cygwin | msys) LN_EXEEXT= ;;
*) LN_EXEEXT='$(EXEEXT)' ;; *) LN_EXEEXT='$(EXEEXT)' ;;
esac esac
AC_SUBST([LN_EXEEXT]) AC_SUBST([LN_EXEEXT])
@ -91,6 +97,7 @@ AC_ARG_ENABLE([encoders], AS_HELP_STRING([--enable-encoders=LIST],
[], [enable_encoders=SUPPORTED_FILTERS]) [], [enable_encoders=SUPPORTED_FILTERS])
enable_encoders=`echo "$enable_encoders" | sed 's/,/ /g'` enable_encoders=`echo "$enable_encoders" | sed 's/,/ /g'`
if test "x$enable_encoders" = xno || test "x$enable_encoders" = x; then if test "x$enable_encoders" = xno || test "x$enable_encoders" = x; then
enable_encoders=no
AC_MSG_RESULT([(none)]) AC_MSG_RESULT([(none)])
else else
for arg in $enable_encoders for arg in $enable_encoders
@ -108,6 +115,8 @@ else
;; ;;
esac esac
done done
AC_DEFINE([HAVE_ENCODERS], [1],
[Define to 1 if any of HAVE_ENCODER_foo have been defined.])
AC_MSG_RESULT([$enable_encoders]) AC_MSG_RESULT([$enable_encoders])
fi fi
@ -118,6 +127,7 @@ AC_ARG_ENABLE([decoders], AS_HELP_STRING([--enable-decoders=LIST],
[], [enable_decoders=SUPPORTED_FILTERS]) [], [enable_decoders=SUPPORTED_FILTERS])
enable_decoders=`echo "$enable_decoders" | sed 's/,/ /g'` enable_decoders=`echo "$enable_decoders" | sed 's/,/ /g'`
if test "x$enable_decoders" = xno || test "x$enable_decoders" = x; then if test "x$enable_decoders" = xno || test "x$enable_decoders" = x; then
enable_decoders=no
AC_MSG_RESULT([(none)]) AC_MSG_RESULT([(none)])
else else
for arg in $enable_decoders for arg in $enable_decoders
@ -135,11 +145,8 @@ else
;; ;;
esac esac
done done
AC_DEFINE([HAVE_DECODERS], [1],
# LZMA2 requires that LZMA1 is enabled. [Define to 1 if any of HAVE_DECODER_foo have been defined.])
test "x$enable_encoder_lzma2" = xyes && enable_encoder_lzma1=yes
test "x$enable_decoder_lzma2" = xyes && enable_decoder_lzma1=yes
AC_MSG_RESULT([$enable_decoders]) AC_MSG_RESULT([$enable_decoders])
fi fi
@ -148,8 +155,8 @@ if test "x$enable_encoder_lzma2$enable_encoder_lzma1" = xyesno \
AC_MSG_ERROR([LZMA2 requires that LZMA1 is also enabled.]) AC_MSG_ERROR([LZMA2 requires that LZMA1 is also enabled.])
fi fi
AM_CONDITIONAL(COND_MAIN_ENCODER, test "x$enable_encoders" != xno && test "x$enable_encoders" != x) AM_CONDITIONAL(COND_MAIN_ENCODER, test "x$enable_encoders" != xno)
AM_CONDITIONAL(COND_MAIN_DECODER, test "x$enable_decoders" != xno && test "x$enable_decoders" != x) AM_CONDITIONAL(COND_MAIN_DECODER, test "x$enable_decoders" != xno)
m4_foreach([NAME], [SUPPORTED_FILTERS], m4_foreach([NAME], [SUPPORTED_FILTERS],
[AM_CONDITIONAL(COND_FILTER_[]m4_toupper(NAME), test "x$enable_filter_[]NAME" = xyes) [AM_CONDITIONAL(COND_FILTER_[]m4_toupper(NAME), test "x$enable_filter_[]NAME" = xyes)
@ -268,6 +275,20 @@ m4_foreach([NAME], [SUPPORTED_CHECKS],
[AM_CONDITIONAL(COND_CHECK_[]m4_toupper(NAME), test "x$enable_check_[]NAME" = xyes) [AM_CONDITIONAL(COND_CHECK_[]m4_toupper(NAME), test "x$enable_check_[]NAME" = xyes)
])dnl ])dnl
AC_MSG_CHECKING([if external SHA-256 should be used])
AC_ARG_ENABLE([external-sha256], AS_HELP_STRING([--enable-external-sha256],
[Use SHA-256 code from the operating system.
See INSTALL for possible subtle problems.]),
[], [enable_external_sha256=no])
if test "x$enable_check_sha256" != "xyes"; then
enable_external_sha256=no
fi
if test "x$enable_external_sha256" = xyes; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
########################### ###########################
# Assembler optimizations # # Assembler optimizations #
@ -283,7 +304,7 @@ if test "x$enable_assembler" = xyes; then
case $host_os in case $host_os in
# Darwin should work too but only if not creating universal # Darwin should work too but only if not creating universal
# binaries. Solaris x86 could work too but I cannot test. # binaries. Solaris x86 could work too but I cannot test.
linux* | *bsd* | mingw* | cygwin* | *djgpp*) linux* | *bsd* | mingw* | cygwin | msys | *djgpp*)
case $host_cpu in case $host_cpu in
i?86) enable_assembler=x86 ;; i?86) enable_assembler=x86 ;;
x86_64) enable_assembler=x86_64 ;; x86_64) enable_assembler=x86_64 ;;
@ -409,18 +430,21 @@ AM_CONDITIONAL([COND_XZ], [test x$enable_xz != xno])
AC_ARG_ENABLE([xzdec], [AS_HELP_STRING([--disable-xzdec], AC_ARG_ENABLE([xzdec], [AS_HELP_STRING([--disable-xzdec],
[do not build xzdec])], [do not build xzdec])],
[], [enable_xzdec=yes]) [], [enable_xzdec=yes])
test "x$enable_decoders" = xno && enable_xzdec=no
AM_CONDITIONAL([COND_XZDEC], [test x$enable_xzdec != xno]) AM_CONDITIONAL([COND_XZDEC], [test x$enable_xzdec != xno])
AC_ARG_ENABLE([lzmadec], [AS_HELP_STRING([--disable-lzmadec], AC_ARG_ENABLE([lzmadec], [AS_HELP_STRING([--disable-lzmadec],
[do not build lzmadec [do not build lzmadec
(it exists primarily for LZMA Utils compatibility)])], (it exists primarily for LZMA Utils compatibility)])],
[], [enable_lzmadec=yes]) [], [enable_lzmadec=yes])
test "x$enable_decoder_lzma1" = xno && enable_lzmadec=no
AM_CONDITIONAL([COND_LZMADEC], [test x$enable_lzmadec != xno]) AM_CONDITIONAL([COND_LZMADEC], [test x$enable_lzmadec != xno])
AC_ARG_ENABLE([lzmainfo], [AS_HELP_STRING([--disable-lzmainfo], AC_ARG_ENABLE([lzmainfo], [AS_HELP_STRING([--disable-lzmainfo],
[do not build lzmainfo [do not build lzmainfo
(it exists primarily for LZMA Utils compatibility)])], (it exists primarily for LZMA Utils compatibility)])],
[], [enable_lzmainfo=yes]) [], [enable_lzmainfo=yes])
test "x$enable_decoder_lzma1" = xno && enable_lzmainfo=no
AM_CONDITIONAL([COND_LZMAINFO], [test x$enable_lzmainfo != xno]) AM_CONDITIONAL([COND_LZMAINFO], [test x$enable_lzmainfo != xno])
AC_ARG_ENABLE([lzma-links], [AS_HELP_STRING([--disable-lzma-links], AC_ARG_ENABLE([lzma-links], [AS_HELP_STRING([--disable-lzma-links],
@ -468,11 +492,71 @@ AC_MSG_RESULT([$enable_symbol_versions])
AM_CONDITIONAL([COND_SYMVERS], [test "x$enable_symbol_versions" = xyes]) AM_CONDITIONAL([COND_SYMVERS], [test "x$enable_symbol_versions" = xyes])
##############
# Sandboxing #
##############
AC_MSG_CHECKING([if sandboxing should be used])
AC_ARG_ENABLE([sandbox], [AS_HELP_STRING([--enable-sandbox=METHOD],
[Sandboxing METHOD can be `auto', `no', or `capsicum'.
The default is `auto' which enables sandboxing if
a supported sandboxing method is found.])],
[], [enable_sandbox=auto])
case $enable_sandbox in
auto)
AC_MSG_RESULT([maybe (autodetect)])
;;
no | capsicum)
AC_MSG_RESULT([$enable_sandbox])
;;
*)
AC_MSG_RESULT([])
AC_MSG_ERROR([--enable-sandbox only accepts `auto', `no', or `capsicum'.])
;;
esac
###########################
# PATH prefix for scripts #
###########################
# The scripts can add a prefix to the search PATH so that POSIX tools
# or the xz binary is always in the PATH.
AC_ARG_ENABLE([path-for-scripts],
[AS_HELP_STRING([--enable-path-for-scripts=PREFIX],
[If PREFIX isn't empty, PATH=PREFIX:$PATH will be set in
the beginning of the scripts (xzgrep and others).
The default is empty except on Solaris the default is
/usr/xpg4/bin.])],
[], [
case $host_os in
solaris*) enable_path_for_scripts=/usr/xpg4/bin ;;
*) enable_path_for_scripts= ;;
esac
])
if test -n "$enable_path_for_scripts" && test "x$enable_path_for_scripts" != xno ; then
enable_path_for_scripts="PATH=$enable_path_for_scripts:\$PATH"
else
enable_path_for_scripts=
fi
AC_SUBST([enable_path_for_scripts])
############################################################################### ###############################################################################
# Checks for programs. # Checks for programs.
############################################################################### ###############################################################################
echo echo
case $host_os in
solaris*)
# The gnulib POSIX shell macro below may pick a shell that
# doesn't work with xzgrep. Workaround by picking a shell
# that is known to work.
if test -z "$gl_cv_posix_shell" && test -x /usr/xpg4/bin/sh; then
gl_cv_posix_shell=/usr/xpg4/bin/sh
fi
;;
esac
gl_POSIX_SHELL gl_POSIX_SHELL
if test -z "$POSIX_SHELL" && test "x$enable_scripts" = xyes ; then if test -z "$POSIX_SHELL" && test "x$enable_scripts" = xyes ; then
AC_MSG_ERROR([No POSIX conforming shell (sh) was found.]) AC_MSG_ERROR([No POSIX conforming shell (sh) was found.])
@ -544,7 +628,7 @@ AM_CONDITIONAL([COND_THREADS], [test "x$enable_threads" != xno])
echo echo
echo "Initializing Libtool:" echo "Initializing Libtool:"
LT_PREREQ([2.2]) LT_PREREQ([2.4])
LT_INIT([win32-dll]) LT_INIT([win32-dll])
LT_LANG([Windows Resource]) LT_LANG([Windows Resource])
@ -559,9 +643,13 @@ AM_CONDITIONAL([COND_SHARED], [test "x$enable_shared" != xno])
# Checks for libraries. # Checks for libraries.
############################################################################### ###############################################################################
dnl Support for _REQUIRE_VERSION was added in gettext 0.19.6. If both
dnl _REQUIRE_VERSION and _VERSION are present, the _VERSION is ignored.
dnl We use both for compatibility with other programs in the Autotools family.
echo echo
echo "Initializing gettext:" echo "Initializing gettext:"
AM_GNU_GETTEXT_VERSION([0.18]) AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6])
AM_GNU_GETTEXT_VERSION([0.19.6])
AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT([external])
@ -624,10 +712,10 @@ AC_C_BIGENDIAN
gl_GETOPT gl_GETOPT
# Find the best function to set timestamps. # Find the best function to set timestamps.
AC_CHECK_FUNCS([futimens futimes futimesat utimes utime], [break]) AC_CHECK_FUNCS([futimens futimes futimesat utimes _futime utime], [break])
# These are nice to have but not mandatory. # This is nice to have but not mandatory.
AC_CHECK_FUNCS([posix_fadvise pipe2]) AC_CHECK_FUNCS([posix_fadvise])
TUKLIB_PROGNAME TUKLIB_PROGNAME
TUKLIB_INTEGER TUKLIB_INTEGER
@ -635,34 +723,34 @@ TUKLIB_PHYSMEM
TUKLIB_CPUCORES TUKLIB_CPUCORES
TUKLIB_MBSTR TUKLIB_MBSTR
# Check for system-provided SHA-256. At least the following is supported: # If requested, check for system-provided SHA-256. At least the following
# implementations are supported:
# #
# OS Headers Library Type Function # OS Headers Library Type Function
# FreeBSD sys/types.h + sha256.h libmd SHA256_CTX SHA256_Init # FreeBSD sys/types.h + sha256.h libmd SHA256_CTX SHA256_Init
# NetBSD sys/types.h + sha2.h SHA256_CTX SHA256_Init # NetBSD sys/types.h + sha2.h SHA256_CTX SHA256_Init
# OpenBSD sys/types.h + sha2.h SHA2_CTX SHA256Init # OpenBSD sys/types.h + sha2.h SHA2_CTX SHA256Init
# Solaris sys/types.h + sha2.h libmd SHA256_CTX SHA256Init # Solaris sys/types.h + sha2.h libmd SHA256_CTX SHA256Init
# MINIX 3 sys/types.h + minix/sha2.h libutil SHA256_CTX SHA256_Init # MINIX 3 sys/types.h + sha2.h SHA256_CTX SHA256_Init
# Darwin CommonCrypto/CommonDigest.h CC_SHA256_CTX CC_SHA256_Init # Darwin CommonCrypto/CommonDigest.h CC_SHA256_CTX CC_SHA256_Init
# #
# Note that Darwin's CC_SHA256_Update takes buffer size as uint32_t instead # Note that Darwin's CC_SHA256_Update takes buffer size as uint32_t instead
# of size_t. # of size_t.
# #
# We don't check for e.g. OpenSSL or libgcrypt because we don't want sha256_header_found=no
# to introduce dependencies to other packages by default. Maybe such sha256_type_found=no
# libraries could be supported via additional configure options though. sha256_func_found=no
# if test "x$enable_external_sha256" = "xyes"; then
if test "x$enable_check_sha256" = "xyes"; then
# Test for Common Crypto before others, because Darwin has sha256.h # Test for Common Crypto before others, because Darwin has sha256.h
# too and we don't want to use that, because on older versions it # too and we don't want to use that, because on older versions it
# uses OpenSSL functions, whose SHA256_Init is not guaranteed to # uses OpenSSL functions, whose SHA256_Init is not guaranteed to
# succeed. # succeed.
sha256_header_found=no
AC_CHECK_HEADERS( AC_CHECK_HEADERS(
[CommonCrypto/CommonDigest.h sha256.h sha2.h minix/sha2.h], [CommonCrypto/CommonDigest.h sha256.h sha2.h],
[sha256_header_found=yes ; break]) [sha256_header_found=yes ; break])
if test "x$sha256_header_found" = xyes; then if test "x$sha256_header_found" = xyes; then
AC_CHECK_TYPES([CC_SHA256_CTX, SHA256_CTX, SHA2_CTX], [], [], AC_CHECK_TYPES([CC_SHA256_CTX, SHA256_CTX, SHA2_CTX],
[sha256_type_found=yes], [],
[[#ifdef HAVE_SYS_TYPES_H [[#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h> # include <sys/types.h>
#endif #endif
@ -674,20 +762,19 @@ if test "x$enable_check_sha256" = "xyes"; then
#endif #endif
#ifdef HAVE_SHA2_H #ifdef HAVE_SHA2_H
# include <sha2.h> # include <sha2.h>
#endif
#ifdef HAVE_MINIX_SHA2_H
# include <minix/sha2.h>
#endif]]) #endif]])
AC_SEARCH_LIBS([SHA256_Init], [md util]) if test "x$sha256_type_found" = xyes ; then
AC_SEARCH_LIBS([SHA256Init], [md]) AC_SEARCH_LIBS([SHA256Init], [md])
AC_CHECK_FUNCS([CC_SHA256_Init SHA256_Init SHA256Init], AC_SEARCH_LIBS([SHA256_Init], [md])
[break]) AC_CHECK_FUNCS([CC_SHA256_Init SHA256Init SHA256_Init],
[sha256_func_found=yes ; break])
fi
fi fi
fi fi
AM_CONDITIONAL([COND_INTERNAL_SHA256], AM_CONDITIONAL([COND_INTERNAL_SHA256], [test "x$sha256_func_found" = xno])
[test "x$ac_cv_func_SHA256_Init" != xyes \ if test "x$enable_external_sha256$sha256_func_found" = xyesno; then
&& test "x$ac_cv_func_SHA256Init" != xyes \ AC_MSG_ERROR([--enable-external-sha256 was specified but no supported external SHA-256 implementation was found])
&& test "x$ac_cv_func_CC_SHA256_Init" != xyes]) fi
# Check for SSE2 intrinsics. # Check for SSE2 intrinsics.
AC_CHECK_DECL([_mm_movemask_epi8], AC_CHECK_DECL([_mm_movemask_epi8],
@ -698,6 +785,23 @@ AC_CHECK_DECL([_mm_movemask_epi8],
#include <immintrin.h> #include <immintrin.h>
#endif]) #endif])
# Check for sandbox support. If one is found, set enable_sandbox=found.
case $enable_sandbox in
auto | capsicum)
AX_CHECK_CAPSICUM([enable_sandbox=found], [:])
;;
esac
# If a specific sandboxing method was explicitly requested and it wasn't
# found, give an error.
case $enable_sandbox in
auto | no | found)
;;
*)
AC_MSG_ERROR([$enable_sandbox support not found])
;;
esac
############################################################################### ###############################################################################
# If using GCC, set some additional AM_CFLAGS: # If using GCC, set some additional AM_CFLAGS:

View File

@ -138,7 +138,7 @@ decompress(lzma_stream *strm, const char *inname, FILE *infile, FILE *outfile)
// Once the end of the input file has been reached, // Once the end of the input file has been reached,
// we need to tell lzma_code() that no more input // we need to tell lzma_code() that no more input
// will be coming. As said before, this isn't required // will be coming. As said before, this isn't required
// if the LZMA_CONATENATED flag isn't used when // if the LZMA_CONCATENATED flag isn't used when
// initializing the decoder. // initializing the decoder.
if (feof(infile)) if (feof(infile))
action = LZMA_FINISH; action = LZMA_FINISH;

View File

@ -206,7 +206,7 @@ Q: How do I build a program that needs liblzmadec (lzmadec.h)?
A: liblzmadec is part of LZMA Utils. XZ Utils has liblzma, but no A: liblzmadec is part of LZMA Utils. XZ Utils has liblzma, but no
liblzmadec. The code using liblzmadec should be ported to use liblzmadec. The code using liblzmadec should be ported to use
liblzma instead. If you cannot or don't want to do that, download liblzma instead. If you cannot or don't want to do that, download
LZMA Utils from <http://tukaani.org/lzma/>. LZMA Utils from <https://tukaani.org/lzma/>.
Q: The default build of liblzma is too big. How can I make it smaller? Q: The default build of liblzma is too big. How can I make it smaller?
@ -220,5 +220,5 @@ A: Give --enable-small to the configure script. Use also appropriate
If the result is still too big, take a look at XZ Embedded. It is If the result is still too big, take a look at XZ Embedded. It is
a separate project, which provides a limited but significantly a separate project, which provides a limited but significantly
smaller XZ decoder implementation than XZ Utils. You can find it smaller XZ decoder implementation than XZ Utils. You can find it
at <http://tukaani.org/xz/embedded.html>. at <https://tukaani.org/xz/embedded.html>.

View File

@ -6,52 +6,50 @@ Introduction
This document explains how to build XZ Utils for DOS using DJGPP. This document explains how to build XZ Utils for DOS using DJGPP.
The resulting binaries should run at least on various DOS versions The resulting binaries should run at least on various DOS versions
and under Windows 95/98/98SE/ME, although the Windows version of and under Windows 95/98/98SE/ME.
XZ Utils is recommended under Windows 95 and later.
This is currently experimental and has got very little testing. This is somewhat experimental and has got very little testing.
Note: Makefile and config.h are updated only now and then. This Note: Makefile and config.h are updated only now and then. This
means that especially if you checked out a development version, means that if you checked out a development version, building for
building for DOS probably won't work without updating Makefile DOS might not work without updating Makefile and config.h first.
and config.h first.
Getting and Installing DJGPP Getting and Installing DJGPP
You may use <http://www.delorie.com/djgpp/zip-picker.html> to help You may use <http://www.delorie.com/djgpp/zip-picker.html> to help
deciding what to download, but as of writing (2010-10-09) that may deciding what to download. If you are only interested in building
not be the most convenient way taking into account what components XZ Utils, the zip-picker may list files that you don't strictly
are actually required to build XZ Utils. However, using the need. However, using the zip-picker can still be worth it to get a
zip-picker can still be worth doing to get nice short summary of nice short summary of installation instructions (they can be found
installation instructions (they can be found from readme.1st too). from readme.1st too).
For a more manual method, first select a mirror from For a more manual method, first select a mirror from
<http://www.delorie.com/djgpp/getting.html>. You need <http://www.delorie.com/djgpp/getting.html> and go the
the following files: subdirectory named "current". You need the following files:
unzip32.exe (if you don't already have a LFN-capable unzipper) unzip32.exe (if you don't already have a LFN-capable unzipper)
beta/v2/djdev204.zip v2/djdev205.zip
v2gnu/bnu219b.zip v2gnu/bnu234b.zip
v2gnu/gcc444b.zip v2gnu/gcc920b.zip
v2gnu/mak3791b.zip v2gnu/mak43b.zip
v2misc/csdpmi7b.zip v2misc/csdpmi7b.zip
If newer versions are available, probably you should try them first. If newer versions are available, probably you should try them first.
Note that djdev203.zip is too old to build XZ Utils; you need at Note that versions older than djdev205.zip aren't supported. Also
least djdev204.zip. Also note that you want csdpmi7b.zip even if you note that you want csdpmi7b.zip even if you run under Windows or
run under Windows or DOSEMU, because the XZ Utils Makefile will embed DOSEMU because the XZ Utils Makefile will embed cwsdstub.exe to
cwsdstub.exe to the resulting binaries. the resulting xz.exe.
See the instructions in readme.1st found from djdev204.zip. Here's See the instructions in readme.1st found from djdev205.zip. Here's
a short summary, but you should still read readme.1st. a short summary, but you should still read readme.1st.
C:\> mkdir DJGPP C:\> mkdir DJGPP
C:\> cd DJGPP C:\> cd DJGPP
C:\DJGPP> c:\download\unzip32 c:\download\djdev204.zip C:\DJGPP> c:\download\unzip32 c:\download\djdev205.zip
C:\DJGPP> c:\download\unzip32 c:\download\bnu219b.zip C:\DJGPP> c:\download\unzip32 c:\download\bnu234b.zip
C:\DJGPP> c:\download\unzip32 c:\download\gcc444b.zip C:\DJGPP> c:\download\unzip32 c:\download\gcc920b.zip
C:\DJGPP> c:\download\unzip32 c:\download\mak3791b.zip C:\DJGPP> c:\download\unzip32 c:\download\mak43b.zip
C:\DJGPP> c:\download\unzip32 c:\download\csdpmi7b.zip C:\DJGPP> c:\download\unzip32 c:\download\csdpmi7b.zip
C:\DJGPP> set PATH=C:\DJGPP\BIN;%PATH% C:\DJGPP> set PATH=C:\DJGPP\BIN;%PATH%
@ -72,8 +70,9 @@ Building
Once you have built XZ Utils, the resulting binaries can be run Once you have built XZ Utils, the resulting binaries can be run
without long filename support. without long filename support.
Run "make" in this directory (the directory containing this README). Run "make" in this directory (the directory containing this
You should get xz.exe (and a bunch of temporary files). Other tools INSTALL.txt). You should get xz.exe (and a bunch of temporary files).
are not built. Having e.g. xzdec.exe doesn't save much space compared Other tools are not built. Having e.g. xzdec.exe doesn't save much
to xz.exe, because the DJGPP runtime makes the .exe quite big anyway. space compared to xz.exe because the DJGPP runtime makes the .exe
quite big anyway.

View File

@ -18,9 +18,7 @@ CPPFLAGS =
CFLAGS = -g -Wall -Wextra -Wfatal-errors -march=i386 -mtune=i686 -O2 CFLAGS = -g -Wall -Wextra -Wfatal-errors -march=i386 -mtune=i686 -O2
LDFLAGS = -lemu LDFLAGS = -lemu
# NOTE: -fgnu89-inline is needed on DJGPP 2.04 beta and GCC >= 4.3.0 ALL_CFLAGS = -std=gnu99
# because time.h uses GNU-style "extern inline".
ALL_CFLAGS = -std=gnu99 -fgnu89-inline
ALL_CPPFLAGS = \ ALL_CPPFLAGS = \
-I. \ -I. \

View File

@ -10,6 +10,9 @@
/* Define to 1 if sha256 integrity check is enabled. */ /* Define to 1 if sha256 integrity check is enabled. */
#define HAVE_CHECK_SHA256 1 #define HAVE_CHECK_SHA256 1
/* Define to 1 if any of HAVE_DECODER_foo have been defined. */
#define HAVE_DECODERS 1
/* Define to 1 if arm decoder is enabled. */ /* Define to 1 if arm decoder is enabled. */
#define HAVE_DECODER_ARM 1 #define HAVE_DECODER_ARM 1
@ -37,6 +40,9 @@
/* Define to 1 if x86 decoder is enabled. */ /* Define to 1 if x86 decoder is enabled. */
#define HAVE_DECODER_X86 1 #define HAVE_DECODER_X86 1
/* Define to 1 if any of HAVE_ENCODER_foo have been defined. */
#define HAVE_ENCODERS 1
/* Define to 1 if arm encoder is enabled. */ /* Define to 1 if arm encoder is enabled. */
#define HAVE_ENCODER_ARM 1 #define HAVE_ENCODER_ARM 1
@ -110,6 +116,14 @@
/* Define to 1 if the system has the type `_Bool'. */ /* Define to 1 if the system has the type `_Bool'. */
#define HAVE__BOOL 1 #define HAVE__BOOL 1
/* Define to 1 if the GNU C extension __builtin_assume_aligned is supported.
*/
#define HAVE___BUILTIN_ASSUME_ALIGNED 1
/* Define to 1 if the GNU C extensions __builtin_bswap16/32/64 are supported.
*/
#define HAVE___BUILTIN_BSWAPXX 1
/* Define to 1 to disable debugging code. */ /* Define to 1 to disable debugging code. */
#define NDEBUG 1 #define NDEBUG 1
@ -120,7 +134,7 @@
#define PACKAGE_NAME "XZ Utils" #define PACKAGE_NAME "XZ Utils"
/* Define to the home page for this package. */ /* Define to the home page for this package. */
#define PACKAGE_URL "http://tukaani.org/xz/" #define PACKAGE_URL "https://tukaani.org/xz/"
/* The size of `size_t', as computed by sizeof. */ /* The size of `size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T 4 #define SIZEOF_SIZE_T 4

View File

@ -37,6 +37,10 @@
/* 5 8 Uncompressed size (little endian). -1 means unknown size */ /* 5 8 Uncompressed size (little endian). -1 means unknown size */
/* 13 Compressed data */ /* 13 Compressed data */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#define BUFSIZE 4096 #define BUFSIZE 4096
int find_lzma_header(unsigned char *buf) { int find_lzma_header(unsigned char *buf) {
@ -48,7 +52,7 @@ int find_lzma_header(unsigned char *buf) {
} }
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
char buf[BUFSIZE]; unsigned char buf[BUFSIZE];
int ret, i, numlzma, blocks=0; int ret, i, numlzma, blocks=0;
if (argc != 2) { if (argc != 2) {

3
m4/.gitignore vendored
View File

@ -1,8 +1,10 @@
codeset.m4 codeset.m4
extern-inline.m4
fcntl-o.m4 fcntl-o.m4
gettext.m4 gettext.m4
glibc2.m4 glibc2.m4
glibc21.m4 glibc21.m4
host-cpu-c-abi.m4
iconv.m4 iconv.m4
intdiv0.m4 intdiv0.m4
intl.m4 intl.m4
@ -32,7 +34,6 @@ stdint_h.m4
threadlib.m4 threadlib.m4
uintmax_t.m4 uintmax_t.m4
ulonglong.m4 ulonglong.m4
visibility.m4
wchar_t.m4 wchar_t.m4
wint_t.m4 wint_t.m4
xsize.m4 xsize.m4

85
m4/ax_check_capsicum.m4 Normal file
View File

@ -0,0 +1,85 @@
# -*- Autoconf -*-
# SYNOPSIS
#
# AX_CHECK_CAPSICUM([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
#
# DESCRIPTION
#
# This macro searches for an installed Capsicum header and library,
# and if found:
# - AC_DEFINE([HAVE_CAPSICUM]) is called.
# - AC_DEFINE([HAVE_SYS_CAPSICUM_H]) is called if <sys/capsicum.h>
# is present (otherwise <sys/capability.h> must be used).
# - CAPSICUM_LIB is set to the -l option needed to link Capsicum support,
# and AC_SUBST([CAPSICUM_LIB]) is called.
# - The shell commands in ACTION-IF-FOUND are run. The default
# ACTION-IF-FOUND prepends ${CAPSICUM_LIB} into LIBS. If you don't
# want to modify LIBS and don't need to run any other commands either,
# use a colon as ACTION-IF-FOUND.
#
# If Capsicum support isn't found:
# - The shell commands in ACTION-IF-NOT-FOUND are run. The default
# ACTION-IF-NOT-FOUND calls AC_MSG_WARN to print a warning that
# Capsicum support wasn't found.
#
# You should use autoheader to include a definition for the symbols above
# in a config.h file.
#
# Sample usage in a C/C++ source is as follows:
#
# #ifdef HAVE_CAPSICUM
# # ifdef HAVE_SYS_CAPSICUM_H
# # include <sys/capsicum.h>
# # else
# # include <sys/capability.h>
# # endif
# #endif /* HAVE_CAPSICUM */
#
# LICENSE
#
# Copyright (c) 2014 Google Inc.
# Copyright (c) 2015 Lasse Collin <lasse.collin@tukaani.org>
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
#serial 2
AC_DEFUN([AX_CHECK_CAPSICUM], [
# On FreeBSD >= 11.x and Linux, Capsicum is uses <sys/capsicum.h>.
# If this header is found, it is assumed to be the right one.
capsicum_header_found=no
AC_CHECK_HEADERS([sys/capsicum.h], [capsicum_header_found=yes])
if test "$capsicum_header_found" = no ; then
# On FreeBSD 10.x Capsicum uses <sys/capability.h>. Such a header exists
# on Linux too but it describes POSIX.1e capabilities. Look for the
# declaration of cap_rights_limit to check if <sys/capability.h> is
# a Capsicum header.
AC_CHECK_DECL([cap_rights_limit], [capsicum_header_found=yes], [],
[#include <sys/capability.h>])
fi
capsicum_lib_found=no
CAPSICUM_LIB=
if test "$capsicum_header_found" = yes ; then
AC_LANG_PUSH([C])
# FreeBSD >= 10.x has Capsicum functions in libc.
AC_LINK_IFELSE([AC_LANG_CALL([], [cap_rights_limit])],
[capsicum_lib_found=yes], [])
# Linux has Capsicum functions in libcaprights.
AC_CHECK_LIB([caprights], [cap_rights_limit],
[CAPSICUM_LIB=-lcaprights
capsicum_lib_found=yes], [])
AC_LANG_POP([C])
fi
AC_SUBST([CAPSICUM_LIB])
if test "$capsicum_lib_found" = yes ; then
AC_DEFINE([HAVE_CAPSICUM], [1], [Define to 1 if Capsicum is available.])
m4_default([$1], [LIBS="${CAPSICUM_LIB} $LIBS"])
else
m4_default([$2], [AC_MSG_WARN([Capsicum support not found])])
fi])

View File

@ -1,5 +1,5 @@
# =========================================================================== # ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_pthread.html # https://www.gnu.org/software/autoconf-archive/ax_pthread.html
# =========================================================================== # ===========================================================================
# #
# SYNOPSIS # SYNOPSIS
@ -19,10 +19,10 @@
# is necessary on AIX to use the special cc_r compiler alias.) # is necessary on AIX to use the special cc_r compiler alias.)
# #
# NOTE: You are assumed to not only compile your program with these flags, # NOTE: You are assumed to not only compile your program with these flags,
# but also link it with them as well. e.g. you should link with # but also to link with them as well. For example, you might link with
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS # $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
# #
# If you are only building threads programs, you may wish to use these # If you are only building threaded programs, you may wish to use these
# variables in your default LIBS, CFLAGS, and CC: # variables in your default LIBS, CFLAGS, and CC:
# #
# LIBS="$PTHREAD_LIBS $LIBS" # LIBS="$PTHREAD_LIBS $LIBS"
@ -30,8 +30,8 @@
# CC="$PTHREAD_CC" # CC="$PTHREAD_CC"
# #
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant # In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name # has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to
# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). # that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
# #
# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the # Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
# PTHREAD_PRIO_INHERIT symbol is defined when compiling with # PTHREAD_PRIO_INHERIT symbol is defined when compiling with
@ -55,6 +55,7 @@
# #
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu> # Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG> # Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
# Copyright (c) 2019 Marc Stevens <marc.stevens@cwi.nl>
# #
# This program is free software: you can redistribute it and/or modify it # This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the # under the terms of the GNU General Public License as published by the
@ -67,7 +68,7 @@
# Public License for more details. # Public License for more details.
# #
# You should have received a copy of the GNU General Public License along # You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>. # with this program. If not, see <https://www.gnu.org/licenses/>.
# #
# As a special exception, the respective Autoconf Macro's copyright owner # As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure # gives unlimited permission to copy, distribute and modify the configure
@ -82,35 +83,40 @@
# modified version of the Autoconf Macro, you may extend this special # modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well. # exception to the GPL to apply to your modified version as well.
#serial 21 #serial 27
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
AC_DEFUN([AX_PTHREAD], [ AC_DEFUN([AX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_PROG_SED])
AC_LANG_PUSH([C]) AC_LANG_PUSH([C])
ax_pthread_ok=no ax_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h # We used to check for pthread.h first, but this fails if pthread.h
# requires special compiler flags (e.g. on True64 or Sequent). # requires special compiler flags (e.g. on Tru64 or Sequent).
# It gets checked for in the link test anyway. # It gets checked for in the link test anyway.
# First of all, check if the user has set any of the PTHREAD_LIBS, # First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using # etcetera environment variables, and if threads linking works using
# them: # them:
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
save_CFLAGS="$CFLAGS" ax_pthread_save_CC="$CC"
ax_pthread_save_CFLAGS="$CFLAGS"
ax_pthread_save_LIBS="$LIBS"
AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"])
CFLAGS="$CFLAGS $PTHREAD_CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS" LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS])
AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes]) AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes])
AC_MSG_RESULT([$ax_pthread_ok]) AC_MSG_RESULT([$ax_pthread_ok])
if test x"$ax_pthread_ok" = xno; then if test "x$ax_pthread_ok" = "xno"; then
PTHREAD_LIBS="" PTHREAD_LIBS=""
PTHREAD_CFLAGS="" PTHREAD_CFLAGS=""
fi fi
LIBS="$save_LIBS" CC="$ax_pthread_save_CC"
CFLAGS="$save_CFLAGS" CFLAGS="$ax_pthread_save_CFLAGS"
LIBS="$ax_pthread_save_LIBS"
fi fi
# We must check for the threads library under a number of different # We must check for the threads library under a number of different
@ -118,12 +124,14 @@ fi
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX). # libraries is broken (non-POSIX).
# Create a list of thread flags to try. Items starting with a "-" are # Create a list of thread flags to try. Items with a "," contain both
# C compiler flags, and other items are library names, except for "none" # C compiler flags (before ",") and linker flags (after ","). Other items
# which indicates that we try without any flags at all, and "pthread-config" # starting with a "-" are C compiler flags, and remaining items are
# which is a program returning the flags for the Pth emulation library. # library names, except for "none" which indicates that we try without
# any flags at all, and "pthread-config" which is a program returning
# the flags for the Pth emulation library.
ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the # The ordering *is* (sometimes) important. Some notes on the
# individual items follow: # individual items follow:
@ -132,82 +140,163 @@ ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt
# none: in case threads are in libc; should be tried before -Kthread and # none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings # other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # (Note: HP C rejects this with "bad form for `-t' option")
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc (Note: HP C also rejects)
# -pthreads: Solaris/gcc
# -mthreads: Mingw32/gcc, Lynx/gcc
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads too; # doesn't hurt to check since this sometimes defines pthreads and
# also defines -D_REENTRANT) # -D_REENTRANT too), HP C (must be checked before -lpthread, which
# ... -mt is also the pthreads flag for HP/aCC # is present but should not be used directly; and before -mthreads,
# because the compiler interprets this as "-mt" + "-hreads")
# -mthreads: Mingw32/gcc, Lynx/gcc
# pthread: Linux, etcetera # pthread: Linux, etcetera
# --thread-safe: KAI C++ # --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library) # pthread-config: use pthread-config program (for GNU Pth library)
case ${host_os} in case $host_os in
freebsd*)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
ax_pthread_flags="-kthread lthread $ax_pthread_flags"
;;
hpux*)
# From the cc(1) man page: "[-mt] Sets various -D flags to enable
# multi-threading and also sets -lpthread."
ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
;;
openedition*)
# IBM z/OS requires a feature-test macro to be defined in order to
# enable POSIX threads at all, so give the user a hint if this is
# not set. (We don't define these ourselves, as they can affect
# other portions of the system API in unpredictable ways.)
AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING],
[
# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
AX_PTHREAD_ZOS_MISSING
# endif
],
[AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])])
;;
solaris*) solaris*)
# On Solaris (at least, for some versions), libc contains stubbed # On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based # (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (We need to link with -pthreads/-mt/ # tests will erroneously succeed. (N.B.: The stubs are missing
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # pthread_cleanup_push, or rather a function called by this macro,
# a function called by this macro, so we could check for that, but # so we could check for that, but who knows whether they'll stub
# who knows whether they'll stub that too in a future libc.) So, # that too in a future libc.) So we'll check first for the
# we'll just look for -pthreads and -lpthread first: # standard Solaris way of linking pthreads (-mt -lpthread).
ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
;;
darwin*)
ax_pthread_flags="-pthread $ax_pthread_flags"
;; ;;
esac esac
# Clang doesn't consider unrecognized options an error unless we specify # Are we compiling with Clang?
# -Werror. We throw in some extra Clang-specific options to ensure that
# this doesn't happen for GCC, which also accepts -Werror.
AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags]) AC_CACHE_CHECK([whether $CC is Clang],
save_CFLAGS="$CFLAGS" [ax_cv_PTHREAD_CLANG],
ax_pthread_extra_flags="-Werror" [ax_cv_PTHREAD_CLANG=no
CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument" # Note that Autoconf sets GCC=yes for Clang as well as GCC
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])], if test "x$GCC" = "xyes"; then
[AC_MSG_RESULT([yes])], AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
[ax_pthread_extra_flags= [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
AC_MSG_RESULT([no])]) # if defined(__clang__) && defined(__llvm__)
CFLAGS="$save_CFLAGS" AX_PTHREAD_CC_IS_CLANG
# endif
],
[ax_cv_PTHREAD_CLANG=yes])
fi
])
ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
if test x"$ax_pthread_ok" = xno; then
for flag in $ax_pthread_flags; do
case $flag in # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
# Note that for GCC and Clang -pthread generally implies -lpthread,
# except when -nostdlib is passed.
# This is problematic using libtool to build C++ shared libraries with pthread:
# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
# To solve this, first try -pthread together with -lpthread for GCC
AS_IF([test "x$GCC" = "xyes"],
[ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"])
# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
AS_IF([test "x$ax_pthread_clang" = "xyes"],
[ax_pthread_flags="-pthread,-lpthread -pthread"])
# The presence of a feature test macro requesting re-entrant function
# definitions is, on some systems, a strong hint that pthreads support is
# correctly enabled
case $host_os in
darwin* | hpux* | linux* | osf* | solaris*)
ax_pthread_check_macro="_REENTRANT"
;;
aix*)
ax_pthread_check_macro="_THREAD_SAFE"
;;
*)
ax_pthread_check_macro="--"
;;
esac
AS_IF([test "x$ax_pthread_check_macro" = "x--"],
[ax_pthread_check_cond=0],
[ax_pthread_check_cond="!defined($ax_pthread_check_macro)"])
if test "x$ax_pthread_ok" = "xno"; then
for ax_pthread_try_flag in $ax_pthread_flags; do
case $ax_pthread_try_flag in
none) none)
AC_MSG_CHECKING([whether pthreads work without any flags]) AC_MSG_CHECKING([whether pthreads work without any flags])
;; ;;
*,*)
PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"])
;;
-*) -*)
AC_MSG_CHECKING([whether pthreads work with $flag]) AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag])
PTHREAD_CFLAGS="$flag" PTHREAD_CFLAGS="$ax_pthread_try_flag"
;; ;;
pthread-config) pthread-config)
AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
if test x"$ax_pthread_config" = xno; then continue; fi AS_IF([test "x$ax_pthread_config" = "xno"], [continue])
PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_CFLAGS="`pthread-config --cflags`"
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
;; ;;
*) *)
AC_MSG_CHECKING([for the pthreads library -l$flag]) AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag])
PTHREAD_LIBS="-l$flag" PTHREAD_LIBS="-l$ax_pthread_try_flag"
;; ;;
esac esac
save_LIBS="$LIBS" ax_pthread_save_CFLAGS="$CFLAGS"
save_CFLAGS="$CFLAGS" ax_pthread_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS" LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
# Check for various functions. We must include pthread.h, # Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we # since some functions may be macros. (On the Sequent, we
@ -218,8 +307,18 @@ for flag in $ax_pthread_flags; do
# pthread_cleanup_push because it is one of the few pthread # pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub. # functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles. # We try pthread_create on general principles.
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h> AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
static void routine(void *a) { a = 0; } # if $ax_pthread_check_cond
# error "$ax_pthread_check_macro must be defined"
# endif
static void *some_global = NULL;
static void routine(void *a)
{
/* To avoid any unused-parameter or
unused-but-set-parameter warning. */
some_global = a;
}
static void *start_routine(void *a) { return a; }], static void *start_routine(void *a) { return a; }],
[pthread_t th; pthread_attr_t attr; [pthread_t th; pthread_attr_t attr;
pthread_create(&th, 0, start_routine, 0); pthread_create(&th, 0, start_routine, 0);
@ -227,88 +326,164 @@ for flag in $ax_pthread_flags; do
pthread_attr_init(&attr); pthread_attr_init(&attr);
pthread_cleanup_push(routine, 0); pthread_cleanup_push(routine, 0);
pthread_cleanup_pop(0) /* ; */])], pthread_cleanup_pop(0) /* ; */])],
[ax_pthread_ok=yes], [ax_pthread_ok=yes],
[]) [])
LIBS="$save_LIBS" CFLAGS="$ax_pthread_save_CFLAGS"
CFLAGS="$save_CFLAGS" LIBS="$ax_pthread_save_LIBS"
AC_MSG_RESULT([$ax_pthread_ok]) AC_MSG_RESULT([$ax_pthread_ok])
if test "x$ax_pthread_ok" = xyes; then AS_IF([test "x$ax_pthread_ok" = "xyes"], [break])
break;
fi
PTHREAD_LIBS="" PTHREAD_LIBS=""
PTHREAD_CFLAGS="" PTHREAD_CFLAGS=""
done done
fi fi
# Clang needs special handling, because older versions handle the -pthread
# option in a rather... idiosyncratic way
if test "x$ax_pthread_clang" = "xyes"; then
# Clang takes -pthread; it has never supported any other flag
# (Note 1: This will need to be revisited if a system that Clang
# supports has POSIX threads in a separate library. This tends not
# to be the way of modern systems, but it's conceivable.)
# (Note 2: On some systems, notably Darwin, -pthread is not needed
# to get POSIX threads support; the API is always present and
# active. We could reasonably leave PTHREAD_CFLAGS empty. But
# -pthread does define _REENTRANT, and while the Darwin headers
# ignore this macro, third-party headers might not.)
# However, older versions of Clang make a point of warning the user
# that, in an invocation where only linking and no compilation is
# taking place, the -pthread option has no effect ("argument unused
# during compilation"). They expect -pthread to be passed in only
# when source code is being compiled.
#
# Problem is, this is at odds with the way Automake and most other
# C build frameworks function, which is that the same flags used in
# compilation (CFLAGS) are also used in linking. Many systems
# supported by AX_PTHREAD require exactly this for POSIX threads
# support, and in fact it is often not straightforward to specify a
# flag that is used only in the compilation phase and not in
# linking. Such a scenario is extremely rare in practice.
#
# Even though use of the -pthread flag in linking would only print
# a warning, this can be a nuisance for well-run software projects
# that build with -Werror. So if the active version of Clang has
# this misfeature, we search for an option to squash it.
AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread],
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG],
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
# Create an alternate version of $ac_link that compiles and
# links in two steps (.c -> .o, .o -> exe) instead of one
# (.c -> exe), because the warning occurs only in the second
# step
ax_pthread_save_ac_link="$ac_link"
ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
ax_pthread_save_CFLAGS="$CFLAGS"
for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
AS_IF([test "x$ax_pthread_try" = "xunknown"], [break])
CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
ac_link="$ax_pthread_save_ac_link"
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
[ac_link="$ax_pthread_2step_ac_link"
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
[break])
])
done
ac_link="$ax_pthread_save_ac_link"
CFLAGS="$ax_pthread_save_CFLAGS"
AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no])
ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
])
case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
no | unknown) ;;
*) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
esac
fi # $ax_pthread_clang = yes
# Various other checks: # Various other checks:
if test "x$ax_pthread_ok" = xyes; then if test "x$ax_pthread_ok" = "xyes"; then
save_LIBS="$LIBS" ax_pthread_save_CFLAGS="$CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS" ax_pthread_save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED. # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
AC_MSG_CHECKING([for joinable pthread attribute]) AC_CACHE_CHECK([for joinable pthread attribute],
attr_name=unknown [ax_cv_PTHREAD_JOINABLE_ATTR],
for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do [ax_cv_PTHREAD_JOINABLE_ATTR=unknown
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>], for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
[int attr = $attr; return attr /* ; */])], AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
[attr_name=$attr; break], [int attr = $ax_pthread_attr; return attr /* ; */])],
[]) [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break],
done [])
AC_MSG_RESULT([$attr_name]) done
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then ])
AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name], AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
[Define to necessary symbol if this constant test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
uses a non-standard name on your system.]) test "x$ax_pthread_joinable_attr_defined" != "xyes"],
fi [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE],
[$ax_cv_PTHREAD_JOINABLE_ATTR],
[Define to necessary symbol if this constant
uses a non-standard name on your system.])
ax_pthread_joinable_attr_defined=yes
])
AC_MSG_CHECKING([if more special flags are required for pthreads]) AC_CACHE_CHECK([whether more special flags are required for pthreads],
flag=no [ax_cv_PTHREAD_SPECIAL_FLAGS],
case ${host_os} in [ax_cv_PTHREAD_SPECIAL_FLAGS=no
aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; case $host_os in
osf* | hpux*) flag="-D_REENTRANT";; solaris*)
solaris*) ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
if test "$GCC" = "yes"; then ;;
flag="-D_REENTRANT" esac
else ])
# TODO: What about Clang on Solaris? AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
flag="-mt -D_REENTRANT" test "x$ax_pthread_special_flags_added" != "xyes"],
fi [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
;; ax_pthread_special_flags_added=yes])
esac
AC_MSG_RESULT([$flag])
if test "x$flag" != xno; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
[ax_cv_PTHREAD_PRIO_INHERIT], [ [ax_cv_PTHREAD_PRIO_INHERIT],
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
[[int i = PTHREAD_PRIO_INHERIT;]])], [[int i = PTHREAD_PRIO_INHERIT;
[ax_cv_PTHREAD_PRIO_INHERIT=yes], return i;]])],
[ax_cv_PTHREAD_PRIO_INHERIT=no]) [ax_cv_PTHREAD_PRIO_INHERIT=yes],
[ax_cv_PTHREAD_PRIO_INHERIT=no])
]) ])
AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"], AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
[AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])]) test "x$ax_pthread_prio_inherit_defined" != "xyes"],
[AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])
ax_pthread_prio_inherit_defined=yes
])
LIBS="$save_LIBS" CFLAGS="$ax_pthread_save_CFLAGS"
CFLAGS="$save_CFLAGS" LIBS="$ax_pthread_save_LIBS"
# More AIX lossage: compile with *_r variant # More AIX lossage: compile with *_r variant
if test "x$GCC" != xyes; then if test "x$GCC" != "xyes"; then
case $host_os in case $host_os in
aix*) aix*)
AS_CASE(["x/$CC"], AS_CASE(["x/$CC"],
[x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
[#handle absolute path differently from PATH based program lookup [#handle absolute path differently from PATH based program lookup
AS_CASE(["x$CC"], AS_CASE(["x$CC"],
[x/*], [x/*],
[AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
[AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
;; ;;
esac esac
fi fi
@ -321,7 +496,7 @@ AC_SUBST([PTHREAD_CFLAGS])
AC_SUBST([PTHREAD_CC]) AC_SUBST([PTHREAD_CC])
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$ax_pthread_ok" = xyes; then if test "x$ax_pthread_ok" = "xyes"; then
ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
: :
else else

View File

@ -10,6 +10,8 @@
# #
# Supported methods: # Supported methods:
# - GetSystemInfo(): Windows (including Cygwin) # - GetSystemInfo(): Windows (including Cygwin)
# - sched_getaffinity(): glibc (GNU/Linux, GNU/kFreeBSD)
# - cpuset_getaffinity(): FreeBSD
# - sysctl(): BSDs, OS/2 # - sysctl(): BSDs, OS/2
# - sysconf(): GNU/Linux, Solaris, Tru64, IRIX, AIX, QNX, Cygwin (but # - sysconf(): GNU/Linux, Solaris, Tru64, IRIX, AIX, QNX, Cygwin (but
# GetSystemInfo() is used on Cygwin) # GetSystemInfo() is used on Cygwin)
@ -45,8 +47,29 @@ compile error
#endif #endif
]])], [tuklib_cv_cpucores_method=special], [ ]])], [tuklib_cv_cpucores_method=special], [
# glibc-based systems (GNU/Linux and GNU/kFreeBSD) have sched_getaffinity().
# The CPU_COUNT() macro was added in glibc 2.9 so we try to link the
# test program instead of merely compiling it. glibc 2.9 is old enough that
# if someone uses the code on older glibc, the fallback to sysconf() should
# be good enough.
AC_LINK_IFELSE([AC_LANG_SOURCE([[
#include <sched.h>
int
main(void)
{
cpu_set_t cpu_mask;
sched_getaffinity(0, sizeof(cpu_mask), &cpu_mask);
return CPU_COUNT(&cpu_mask);
}
]])], [tuklib_cv_cpucores_method=sched_getaffinity], [
# FreeBSD has both cpuset and sysctl. Look for cpuset first because # FreeBSD has both cpuset and sysctl. Look for cpuset first because
# it's a better approach. # it's a better approach.
#
# This test would match on GNU/kFreeBSD too but it would require
# -lfreebsd-glue when linking and thus in the current form this would
# fail on GNU/kFreeBSD. The above test for sched_getaffinity() matches
# on GNU/kFreeBSD so the test below should never run on that OS.
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#include <sys/param.h> #include <sys/param.h>
#include <sys/cpuset.h> #include <sys/cpuset.h>
@ -120,9 +143,14 @@ main(void)
]])], [tuklib_cv_cpucores_method=pstat_getdynamic], [ ]])], [tuklib_cv_cpucores_method=pstat_getdynamic], [
tuklib_cv_cpucores_method=unknown tuklib_cv_cpucores_method=unknown
])])])])])]) ])])])])])])])
case $tuklib_cv_cpucores_method in case $tuklib_cv_cpucores_method in
sched_getaffinity)
AC_DEFINE([TUKLIB_CPUCORES_SCHED_GETAFFINITY], [1],
[Define to 1 if the number of available CPU cores
can be detected with sched_getaffinity()])
;;
cpuset) cpuset)
AC_DEFINE([TUKLIB_CPUCORES_CPUSET], [1], AC_DEFINE([TUKLIB_CPUCORES_CPUSET], [1],
[Define to 1 if the number of available CPU cores [Define to 1 if the number of available CPU cores

View File

@ -7,7 +7,7 @@
# #
# Checks for tuklib_integer.h: # Checks for tuklib_integer.h:
# - Endianness # - Endianness
# - Does operating system provide byte swapping macros # - Does the compiler or the operating system provide byte swapping macros
# - Does the hardware support fast unaligned access to 16-bit # - Does the hardware support fast unaligned access to 16-bit
# and 32-bit integers # and 32-bit integers
# #
@ -22,13 +22,28 @@
AC_DEFUN_ONCE([TUKLIB_INTEGER], [ AC_DEFUN_ONCE([TUKLIB_INTEGER], [
AC_REQUIRE([TUKLIB_COMMON]) AC_REQUIRE([TUKLIB_COMMON])
AC_REQUIRE([AC_C_BIGENDIAN]) AC_REQUIRE([AC_C_BIGENDIAN])
AC_CHECK_HEADERS([byteswap.h sys/endian.h sys/byteorder.h], [break])
# Even if we have byteswap.h, we may lack the specific macros/functions. AC_MSG_CHECKING([if __builtin_bswap16/32/64 are supported])
if test x$ac_cv_header_byteswap_h = xyes ; then AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
m4_foreach([FUNC], [bswap_16,bswap_32,bswap_64], [ [[__builtin_bswap16(1);
AC_MSG_CHECKING([if FUNC is available]) __builtin_bswap32(1);
AC_LINK_IFELSE([AC_LANG_SOURCE([ __builtin_bswap64(1);]])],
[
AC_DEFINE([HAVE___BUILTIN_BSWAPXX], [1],
[Define to 1 if the GNU C extensions
__builtin_bswap16/32/64 are supported.])
AC_MSG_RESULT([yes])
], [
AC_MSG_RESULT([no])
# Look for other byteswapping methods.
AC_CHECK_HEADERS([byteswap.h sys/endian.h sys/byteorder.h], [break])
# Even if we have byteswap.h we may lack the specific macros/functions.
if test x$ac_cv_header_byteswap_h = xyes ; then
m4_foreach([FUNC], [bswap_16,bswap_32,bswap_64], [
AC_MSG_CHECKING([if FUNC is available])
AC_LINK_IFELSE([AC_LANG_SOURCE([
#include <byteswap.h> #include <byteswap.h>
int int
main(void) main(void)
@ -36,14 +51,15 @@ main(void)
FUNC[](42); FUNC[](42);
return 0; return 0;
} }
])], [ ])], [
AC_DEFINE(HAVE_[]m4_toupper(FUNC), [1], AC_DEFINE(HAVE_[]m4_toupper(FUNC), [1],
[Define to 1 if] FUNC [is available.]) [Define to 1 if] FUNC [is available.])
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
], [AC_MSG_RESULT([no])]) ], [AC_MSG_RESULT([no])])
])dnl ])dnl
fi fi
])
AC_MSG_CHECKING([if unaligned memory access should be used]) AC_MSG_CHECKING([if unaligned memory access should be used])
AC_ARG_ENABLE([unaligned-access], AS_HELP_STRING([--enable-unaligned-access], AC_ARG_ENABLE([unaligned-access], AS_HELP_STRING([--enable-unaligned-access],
@ -71,4 +87,33 @@ if test "x$enable_unaligned_access" = xyes ; then
else else
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
fi fi
AC_MSG_CHECKING([if unsafe type punning should be used])
AC_ARG_ENABLE([unsafe-type-punning],
AS_HELP_STRING([--enable-unsafe-type-punning],
[This introduces strict aliasing violations and may result
in broken code. However, this might improve performance in
some cases, especially with old compilers (e.g.
GCC 3 and early 4.x on x86, GCC < 6 on ARMv6 and ARMv7).]),
[], [enable_unsafe_type_punning=no])
if test "x$enable_unsafe_type_punning" = xyes ; then
AC_DEFINE([TUKLIB_USE_UNSAFE_TYPE_PUNNING], [1], [Define to 1 to use
unsafe type punning, e.g. char *x = ...; *(int *)x = 123;
which violates strict aliasing rules and thus is
undefined behavior and might result in broken code.])
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
AC_MSG_CHECKING([if __builtin_assume_aligned is supported])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[__builtin_assume_aligned("", 1);]])],
[
AC_DEFINE([HAVE___BUILTIN_ASSUME_ALIGNED], [1],
[Define to 1 if the GNU C extension
__builtin_assume_aligned is supported.])
AC_MSG_RESULT([yes])
], [
AC_MSG_RESULT([no])
])
])dnl ])dnl

77
m4/visibility.m4 Normal file
View File

@ -0,0 +1,77 @@
# visibility.m4 serial 6
dnl Copyright (C) 2005, 2008, 2010-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
dnl Tests whether the compiler supports the command-line option
dnl -fvisibility=hidden and the function and variable attributes
dnl __attribute__((__visibility__("hidden"))) and
dnl __attribute__((__visibility__("default"))).
dnl Does *not* test for __visibility__("protected") - which has tricky
dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
dnl Mac OS X.
dnl Does *not* test for __visibility__("internal") - which has processor
dnl dependent semantics.
dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
dnl "really only recommended for legacy code".
dnl Set the variable CFLAG_VISIBILITY.
dnl Defines and sets the variable HAVE_VISIBILITY.
AC_DEFUN([gl_VISIBILITY],
[
AC_REQUIRE([AC_PROG_CC])
CFLAG_VISIBILITY=
HAVE_VISIBILITY=0
if test -n "$GCC"; then
dnl First, check whether -Werror can be added to the command line, or
dnl whether it leads to an error because of some other option that the
dnl user has put into $CC $CFLAGS $CPPFLAGS.
AC_CACHE_CHECK([whether the -Werror option is usable],
[gl_cv_cc_vis_werror],
[gl_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[]], [[]])],
[gl_cv_cc_vis_werror=yes],
[gl_cv_cc_vis_werror=no])
CFLAGS="$gl_save_CFLAGS"
])
dnl Now check whether visibility declarations are supported.
AC_CACHE_CHECK([for simple visibility declarations],
[gl_cv_cc_visibility],
[gl_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fvisibility=hidden"
dnl We use the option -Werror and a function dummyfunc, because on some
dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
dnl "visibility attribute not supported in this configuration; ignored"
dnl at the first function definition in every compilation unit, and we
dnl don't want to use the option in this case.
if test $gl_cv_cc_vis_werror = yes; then
CFLAGS="$CFLAGS -Werror"
fi
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
extern __attribute__((__visibility__("default"))) int exportedvar;
extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
extern __attribute__((__visibility__("default"))) int exportedfunc (void);
void dummyfunc (void) {}
]],
[[]])],
[gl_cv_cc_visibility=yes],
[gl_cv_cc_visibility=no])
CFLAGS="$gl_save_CFLAGS"
])
if test $gl_cv_cc_visibility = yes; then
CFLAG_VISIBILITY="-fvisibility=hidden"
HAVE_VISIBILITY=1
fi
fi
AC_SUBST([CFLAG_VISIBILITY])
AC_SUBST([HAVE_VISIBILITY])
AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
[Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
])

View File

@ -1,6 +1,12 @@
cs cs
da
de de
fi
fr fr
hu
it it
pl pl
pt_BR
vi vi
zh_CN
zh_TW

596
po/cs.po

File diff suppressed because it is too large Load Diff

896
po/da.po Normal file
View File

@ -0,0 +1,896 @@
# Danish translation xz.
# This file is put in the public domain.
# Joe Hansen <joedalton2@yahoo.dk>, 2019.
#
msgid ""
msgstr ""
"Project-Id-Version: xz 5.2.4\n"
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
"POT-Creation-Date: 2018-04-29 18:19+0300\n"
"PO-Revision-Date: 2019-03-04 23:08+0100\n"
"Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n"
"Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
"Language: da\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/xz/args.c:63
#, c-format
msgid "%s: Invalid argument to --block-list"
msgstr "%s: Ugyldigt parameter til --block-list"
#: src/xz/args.c:73
#, c-format
msgid "%s: Too many arguments to --block-list"
msgstr "%s: For mange argumenter til --block-list"
#: src/xz/args.c:102
msgid "0 can only be used as the last element in --block-list"
msgstr "0 kan kun bruges som det sidste element i --block-list"
#: src/xz/args.c:406
#, c-format
msgid "%s: Unknown file format type"
msgstr "%s: Ukendt filformattype"
#: src/xz/args.c:429 src/xz/args.c:437
#, c-format
msgid "%s: Unsupported integrity check type"
msgstr "%s: Typen for integritetkontrol er ikke understøttet"
#: src/xz/args.c:473
msgid "Only one file can be specified with `--files' or `--files0'."
msgstr "Kun en fil kan angives med »--files« eller »--files0«."
#: src/xz/args.c:541
#, c-format
msgid "The environment variable %s contains too many arguments"
msgstr "Miljøvariablen %s indeholder for mange argumenter"
#: src/xz/args.c:643
msgid "Compression support was disabled at build time"
msgstr "Komprimeringsunderstøttelse blev deaktiveret på byggetidspunktet"
#: src/xz/args.c:650
msgid "Decompression support was disabled at build time"
msgstr "Dekomprimeringsunderstøttelse blev deaktiveret på byggetidspunktet"
#: src/xz/coder.c:110
msgid "Maximum number of filters is four"
msgstr "Maksimalt antal filtre er fire"
#: src/xz/coder.c:129
msgid "Memory usage limit is too low for the given filter setup."
msgstr "Begræsningen for brug af hukommelse er for lav for den givne filteropsætning."
#: src/xz/coder.c:159
msgid "Using a preset in raw mode is discouraged."
msgstr "Det frarådes at bruge en forhåndskonfiguration i rå tilstand (raw mode)."
#: src/xz/coder.c:161
msgid "The exact options of the presets may vary between software versions."
msgstr "De præcise indstillinger for forhåndskonfigurationerne kan variere mellem programversioner."
#: src/xz/coder.c:184
msgid "The .lzma format supports only the LZMA1 filter"
msgstr "Formatet .lzma understøtter kun LZMA1-filteret"
#: src/xz/coder.c:192
msgid "LZMA1 cannot be used with the .xz format"
msgstr "LZMA1 kan ikke bruges med .xz-formatet"
#: src/xz/coder.c:209
msgid "The filter chain is incompatible with --flush-timeout"
msgstr "Filterkæden er ikke kompatibel med --flush-timeout"
#: src/xz/coder.c:215
msgid "Switching to single-threaded mode due to --flush-timeout"
msgstr "Skifter til enkelt trådet tilstand på grund af --flush-timeout"
#: src/xz/coder.c:235
#, c-format
msgid "Using up to %<PRIu32> threads."
msgstr "Bruger op til %<PRIu32> tråde."
#: src/xz/coder.c:251
msgid "Unsupported filter chain or filter options"
msgstr "Filterkæde eller filterindstillinger er ikke understøttet"
#: src/xz/coder.c:263
#, c-format
msgid "Decompression will need %s MiB of memory."
msgstr "Dekomprimering vil kræve %s MiB hukommelse."
#: src/xz/coder.c:300
#, c-format
msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
msgstr "Justerede antallet af tråde fra %s til %s for ikke at overskride begræsningen på brug af hukommelse på %s MiB"
#: src/xz/coder.c:354
#, c-format
msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
msgstr "Justerede LZMA%c-ordbogsstørrelsen fra %s MiB til %s MiB for ikke at overskride begrænsningen på brug af hukommelse på %s MiB"
#: src/xz/file_io.c:110 src/xz/file_io.c:118
#, c-format
msgid "Error creating a pipe: %s"
msgstr "Det opstod en fejl under oprettelse af en datakanal: %s"
#: src/xz/file_io.c:173
msgid "Sandbox is disabled due to incompatible command line arguments"
msgstr "Sandkassen er deaktiveret på grund af inkompatible kommandolinjeargumenter"
#: src/xz/file_io.c:216
msgid "Sandbox was successfully enabled"
msgstr "Sandkassen blev aktiveret"
#: src/xz/file_io.c:220
msgid "Failed to enable the sandbox"
msgstr "Kunne ikke aktivere sandkassen"
#: src/xz/file_io.c:262
#, c-format
msgid "%s: poll() failed: %s"
msgstr "%s: poll() mislykkedes: %s"
#. TRANSLATORS: When compression or decompression finishes,
#. and xz is going to remove the source file, xz first checks
#. if the source file still exists, and if it does, does its
#. device and inode numbers match what xz saw when it opened
#. the source file. If these checks fail, this message is
#. shown, %s being the filename, and the file is not deleted.
#. The check for device and inode numbers is there, because
#. it is possible that the user has put a new file in place
#. of the original file, and in that case it obviously
#. shouldn't be removed.
#: src/xz/file_io.c:332
#, c-format
msgid "%s: File seems to have been moved, not removing"
msgstr "%s: Filen er vist blevet flyttet, sletter ikke"
#: src/xz/file_io.c:339 src/xz/file_io.c:878
#, c-format
msgid "%s: Cannot remove: %s"
msgstr "%s: Kan ikke fjerne: %s"
#: src/xz/file_io.c:364
#, c-format
msgid "%s: Cannot set the file owner: %s"
msgstr "%s: Kan ikke angive filejeren: %s"
#: src/xz/file_io.c:370
#, c-format
msgid "%s: Cannot set the file group: %s"
msgstr "%s: Kan ikke angive filgruppen: %s"
#: src/xz/file_io.c:389
#, c-format
msgid "%s: Cannot set the file permissions: %s"
msgstr "%s: Kan ikke angive filtilladelser: %s"
#: src/xz/file_io.c:515
#, c-format
msgid "Error getting the file status flags from standard input: %s"
msgstr "Der opstod en fejl under indhentelse af filstatusflag fra standardind: %s"
#: src/xz/file_io.c:572 src/xz/file_io.c:634
#, c-format
msgid "%s: Is a symbolic link, skipping"
msgstr "%s: Er en symbolsk henvisning, udelader"
#: src/xz/file_io.c:663
#, c-format
msgid "%s: Is a directory, skipping"
msgstr "%s: Er en mappe, udelader"
#: src/xz/file_io.c:669
#, c-format
msgid "%s: Not a regular file, skipping"
msgstr "%s: Er ikke en normal fil, udelader"
#: src/xz/file_io.c:686
#, c-format
msgid "%s: File has setuid or setgid bit set, skipping"
msgstr "%s: Filen har setuid- eller setgid-bitsæt, udelader"
#: src/xz/file_io.c:693
#, c-format
msgid "%s: File has sticky bit set, skipping"
msgstr "%s: Fil har klæbende bitsæt, udelader"
#: src/xz/file_io.c:700
#, c-format
msgid "%s: Input file has more than one hard link, skipping"
msgstr "%s: Inddatafil har mere end en hård henvisning, udelader"
#: src/xz/file_io.c:788
#, c-format
msgid "Error restoring the status flags to standard input: %s"
msgstr "Der opstod en fejl under gendannelse af statusflagene til standardind: %s"
#: src/xz/file_io.c:836
#, c-format
msgid "Error getting the file status flags from standard output: %s"
msgstr "Der opstod en fejl under indhentelse af filstatusflag fra standardud: %s"
#: src/xz/file_io.c:1014
#, c-format
msgid "Error restoring the O_APPEND flag to standard output: %s"
msgstr "Der opstod en fejl under gendannelse af flaget O_APPEND til standardud: %s"
#: src/xz/file_io.c:1026
#, c-format
msgid "%s: Closing the file failed: %s"
msgstr "%s: Lukning af filen fejlede: %s"
#: src/xz/file_io.c:1062 src/xz/file_io.c:1288
#, c-format
msgid "%s: Seeking failed when trying to create a sparse file: %s"
msgstr "%s: Søgning fejlede under forsøg på at oprette en tynd fil: %s"
#: src/xz/file_io.c:1157
#, c-format
msgid "%s: Read error: %s"
msgstr "%s: Læsefejl: %s"
#: src/xz/file_io.c:1177
#, c-format
msgid "%s: Error seeking the file: %s"
msgstr "%s: Der opstod en fejl under søgning efter filen: %s"
#: src/xz/file_io.c:1187
#, c-format
msgid "%s: Unexpected end of file"
msgstr "%s: Uventet filafslutning"
#: src/xz/file_io.c:1246
#, c-format
msgid "%s: Write error: %s"
msgstr "%s: Skrivefejl: %s"
#: src/xz/hardware.c:107
msgid "Disabled"
msgstr "Deaktiveret"
#. TRANSLATORS: Test with "xz --info-memory" to see if
#. the alignment looks nice.
#: src/xz/hardware.c:126
msgid "Total amount of physical memory (RAM): "
msgstr "Samlet mængde fysisk hukommelse (RAM): "
#: src/xz/hardware.c:128
msgid "Memory usage limit for compression: "
msgstr "Grænse for hukommelsesforbrug til komprimering: "
#: src/xz/hardware.c:130
msgid "Memory usage limit for decompression: "
msgstr "Grænse for hukommelsesforbug til dekomprimering: "
#. TRANSLATORS: Indicates that there is no integrity check.
#. This string is used in tables, so the width must not
#. exceed ten columns with a fixed-width font.
#: src/xz/list.c:65
msgid "None"
msgstr "Ingen"
#. TRANSLATORS: Indicates that integrity check name is not known,
#. but the Check ID is known (here 2). This and other "Unknown-N"
#. strings are used in tables, so the width must not exceed ten
#. columns with a fixed-width font. It's OK to omit the dash if
#. you need space for one extra letter, but don't use spaces.
#: src/xz/list.c:72
msgid "Unknown-2"
msgstr "Ukendt-2"
#: src/xz/list.c:73
msgid "Unknown-3"
msgstr "Ukendt-3"
#: src/xz/list.c:75
msgid "Unknown-5"
msgstr "Ukendt-5"
#: src/xz/list.c:76
msgid "Unknown-6"
msgstr "Ukendt-6"
#: src/xz/list.c:77
msgid "Unknown-7"
msgstr "Ukendt-7"
#: src/xz/list.c:78
msgid "Unknown-8"
msgstr "Ukendt-8"
#: src/xz/list.c:79
msgid "Unknown-9"
msgstr "Ukendt-9"
#: src/xz/list.c:81
msgid "Unknown-11"
msgstr "Ukendt-11"
#: src/xz/list.c:82
msgid "Unknown-12"
msgstr "Ukendt-12"
#: src/xz/list.c:83
msgid "Unknown-13"
msgstr "Ukendt-13"
#: src/xz/list.c:84
msgid "Unknown-14"
msgstr "Ukendt-14"
#: src/xz/list.c:85
msgid "Unknown-15"
msgstr "Ukendt-15"
#: src/xz/list.c:153
#, c-format
msgid "%s: File is empty"
msgstr "%s: Filen er tom"
#: src/xz/list.c:158
#, c-format
msgid "%s: Too small to be a valid .xz file"
msgstr "%s: For lille til at være en gyldig .xz-fil"
#. TRANSLATORS: These are column headings. From Strms (Streams)
#. to Ratio, the columns are right aligned. Check and Filename
#. are left aligned. If you need longer words, it's OK to
#. use two lines here. Test with "xz -l foo.xz".
#: src/xz/list.c:677
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
msgstr ""
#: src/xz/list.c:717
#, c-format
msgid " Streams: %s\n"
msgstr " Strømme: %s\n"
#: src/xz/list.c:719
#, c-format
msgid " Blocks: %s\n"
msgstr " Blokke: %s\n"
#: src/xz/list.c:721
#, c-format
msgid " Compressed size: %s\n"
msgstr " Komprimeret str.: %s\n"
#: src/xz/list.c:724
#, c-format
msgid " Uncompressed size: %s\n"
msgstr " Ukomprimeret str.: %s\n"
#: src/xz/list.c:727
#, c-format
msgid " Ratio: %s\n"
msgstr " Pakkeforhold: %s\n"
#: src/xz/list.c:729
#, c-format
msgid " Check: %s\n"
msgstr " Kontrol: %s\n"
#: src/xz/list.c:730
#, c-format
msgid " Stream padding: %s\n"
msgstr " Strømfyld: %s\n"
#. TRANSLATORS: The second line is column headings. All except
#. Check are right aligned; Check is left aligned. Test with
#. "xz -lv foo.xz".
#: src/xz/list.c:758
msgid ""
" Streams:\n"
" Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
msgstr ""
" Strømme:\n"
" Strøm Blokke KompForsk. DekompForsk. KompStr. DekompStr. Forh. Kontrol Fyld"
#. TRANSLATORS: The second line is column headings. All
#. except Check are right aligned; Check is left aligned.
#: src/xz/list.c:813
#, c-format
msgid ""
" Blocks:\n"
" Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
msgstr ""
" Blokke:\n"
" Strøm Blok KompForsk. DekompForsk. Ialtstr. DekompStr. Forh. Kontrol"
#. TRANSLATORS: These are additional column headings
#. for the most verbose listing mode. CheckVal
#. (Check value), Flags, and Filters are left aligned.
#. Header (Block Header Size), CompSize, and MemUsage
#. are right aligned. %*s is replaced with 0-120
#. spaces to make the CheckVal column wide enough.
#. Test with "xz -lvv foo.xz".
#: src/xz/list.c:825
#, c-format
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
msgstr " KontrolVær %*sTeksth Flag Kompstr. HukForb. Filtre"
#: src/xz/list.c:903 src/xz/list.c:1078
#, c-format
msgid " Memory needed: %s MiB\n"
msgstr " Hukommelse krævet: %s MiB\n"
#: src/xz/list.c:905 src/xz/list.c:1080
#, c-format
msgid " Sizes in headers: %s\n"
msgstr " Størrelser i teksthoveder: %s\n"
#: src/xz/list.c:906 src/xz/list.c:1081
msgid "Yes"
msgstr "Ja"
#: src/xz/list.c:906 src/xz/list.c:1081
msgid "No"
msgstr "Nej"
#: src/xz/list.c:907 src/xz/list.c:1082
#, c-format
msgid " Minimum XZ Utils version: %s\n"
msgstr " Minimum for XZ Utils-version: %s\n"
#. TRANSLATORS: %s is an integer. Only the plural form of this
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
#: src/xz/list.c:1057
#, c-format
msgid "%s file\n"
msgid_plural "%s files\n"
msgstr[0] "%s fil\n"
msgstr[1] "%s filer\n"
#: src/xz/list.c:1070
msgid "Totals:"
msgstr "I alt:"
#: src/xz/list.c:1071
#, c-format
msgid " Number of files: %s\n"
msgstr " Antal filer: %s\n"
#: src/xz/list.c:1146
msgid "--list works only on .xz files (--format=xz or --format=auto)"
msgstr ""
#: src/xz/list.c:1152
msgid "--list does not support reading from standard input"
msgstr "--list understøtter ikke læsning fra standardind"
#: src/xz/main.c:89
#, c-format
msgid "%s: Error reading filenames: %s"
msgstr "%s: Der opstod en fejl under forsøg på læsning af filnavne: %s"
#: src/xz/main.c:96
#, c-format
msgid "%s: Unexpected end of input when reading filenames"
msgstr "%s: Uventet afslutning på inddata under forsøg på læsning af filnavne"
#: src/xz/main.c:120
#, c-format
msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
msgstr ""
#: src/xz/main.c:174
msgid "Compression and decompression with --robot are not supported yet."
msgstr "Komprimering og dekomprimering med --robot er endnu ikke understøttet."
#: src/xz/main.c:252
msgid "Cannot read data from standard input when reading filenames from standard input"
msgstr ""
#. TRANSLATORS: This is the program name in the beginning
#. of the line in messages. Usually it becomes "xz: ".
#. This is a translatable string because French needs
#. a space before a colon.
#: src/xz/message.c:714
#, c-format
msgid "%s: "
msgstr "%s: "
#: src/xz/message.c:777 src/xz/message.c:827
msgid "Internal error (bug)"
msgstr "Intern fejl (fejl)"
#: src/xz/message.c:784
msgid "Cannot establish signal handlers"
msgstr "Kan ikke etbalere signalhåndteringer"
#: src/xz/message.c:793
msgid "No integrity check; not verifying file integrity"
msgstr "Ingen integritetkontrol; verificerer ikke filintegritet"
#: src/xz/message.c:796
msgid "Unsupported type of integrity check; not verifying file integrity"
msgstr ""
#: src/xz/message.c:803
msgid "Memory usage limit reached"
msgstr "Begrænsning på brug af hukommelse er nået"
#: src/xz/message.c:806
msgid "File format not recognized"
msgstr "Filformatet blev ikke genkendt"
#: src/xz/message.c:809
msgid "Unsupported options"
msgstr "Tilvalg er ikke understøttede"
#: src/xz/message.c:812
msgid "Compressed data is corrupt"
msgstr "Komprimerede data er ødelagte"
#: src/xz/message.c:815
msgid "Unexpected end of input"
msgstr "Uventet afslutning på inddata"
#: src/xz/message.c:848
#, c-format
msgid "%s MiB of memory is required. The limiter is disabled."
msgstr "%s MiB hukommelse er krævet. Begrænseren er deaktiveret."
#: src/xz/message.c:876
#, c-format
msgid "%s MiB of memory is required. The limit is %s."
msgstr "%s MiB hukommelse er krævet. Begrænsningen er %s."
#: src/xz/message.c:1043
#, c-format
msgid "%s: Filter chain: %s\n"
msgstr "%s: Filterkæde: %s\n"
#: src/xz/message.c:1053
#, c-format
msgid "Try `%s --help' for more information."
msgstr "Prøv »%s --help« for yderligere information."
#: src/xz/message.c:1079
#, c-format
msgid ""
"Usage: %s [OPTION]... [FILE]...\n"
"Compress or decompress FILEs in the .xz format.\n"
"\n"
msgstr ""
#: src/xz/message.c:1086
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
msgstr ""
"Obligatoriske argumenter til lange tilvalg er også obligatoriske for korte\n"
"tilvalg.\n"
#: src/xz/message.c:1090
msgid " Operation mode:\n"
msgstr " Operationstilstand:\n"
#: src/xz/message.c:1093
msgid ""
" -z, --compress force compression\n"
" -d, --decompress force decompression\n"
" -t, --test test compressed file integrity\n"
" -l, --list list information about .xz files"
msgstr ""
#: src/xz/message.c:1099
msgid ""
"\n"
" Operation modifiers:\n"
msgstr ""
"\n"
"Operationsændrere:\n"
#: src/xz/message.c:1102
msgid ""
" -k, --keep keep (don't delete) input files\n"
" -f, --force force overwrite of output file and (de)compress links\n"
" -c, --stdout write to standard output and don't delete input files"
msgstr ""
#: src/xz/message.c:1108
msgid ""
" --single-stream decompress only the first stream, and silently\n"
" ignore possible remaining input data"
msgstr ""
#: src/xz/message.c:1111
msgid ""
" --no-sparse do not create sparse files when decompressing\n"
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
" --files[=FILE] read filenames to process from FILE; if FILE is\n"
" omitted, filenames are read from the standard input;\n"
" filenames must be terminated with the newline character\n"
" --files0[=FILE] like --files but use the null character as terminator"
msgstr ""
#: src/xz/message.c:1120
msgid ""
"\n"
" Basic file format and compression options:\n"
msgstr ""
#: src/xz/message.c:1122
msgid ""
" -F, --format=FMT file format to encode or decode; possible values are\n"
" `auto' (default), `xz', `lzma', and `raw'\n"
" -C, --check=CHECK integrity check type: `none' (use with caution),\n"
" `crc32', `crc64' (default), or `sha256'"
msgstr ""
#: src/xz/message.c:1127
msgid " --ignore-check don't verify the integrity check when decompressing"
msgstr ""
#: src/xz/message.c:1131
msgid ""
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
" decompressor memory usage into account before using 7-9!"
msgstr ""
#: src/xz/message.c:1135
msgid ""
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
" does not affect decompressor memory requirements"
msgstr ""
#: src/xz/message.c:1139
msgid ""
" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
" to use as many threads as there are processor cores"
msgstr ""
#: src/xz/message.c:1144
msgid ""
" --block-size=SIZE\n"
" start a new .xz block after every SIZE bytes of input;\n"
" use this to set the block size for threaded compression"
msgstr ""
#: src/xz/message.c:1148
msgid ""
" --block-list=SIZES\n"
" start a new .xz block after the given comma-separated\n"
" intervals of uncompressed data"
msgstr ""
#: src/xz/message.c:1152
msgid ""
" --flush-timeout=TIMEOUT\n"
" when compressing, if more than TIMEOUT milliseconds has\n"
" passed since the previous flush and reading more input\n"
" would block, all pending data is flushed out"
msgstr ""
#: src/xz/message.c:1158
#, no-c-format
msgid ""
" --memlimit-compress=LIMIT\n"
" --memlimit-decompress=LIMIT\n"
" -M, --memlimit=LIMIT\n"
" set memory usage limit for compression, decompression,\n"
" or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
msgstr ""
#: src/xz/message.c:1165
msgid ""
" --no-adjust if compression settings exceed the memory usage limit,\n"
" give an error instead of adjusting the settings downwards"
msgstr ""
#: src/xz/message.c:1171
msgid ""
"\n"
" Custom filter chain for compression (alternative for using presets):"
msgstr ""
#: src/xz/message.c:1180
msgid ""
"\n"
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
" --lzma2[=OPTS] more of the following options (valid values; default):\n"
" preset=PRE reset options to a preset (0-9[e])\n"
" dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n"
" lc=NUM number of literal context bits (0-4; 3)\n"
" lp=NUM number of literal position bits (0-4; 0)\n"
" pb=NUM number of position bits (0-4; 2)\n"
" mode=MODE compression mode (fast, normal; normal)\n"
" nice=NUM nice length of a match (2-273; 64)\n"
" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n"
" depth=NUM maximum search depth; 0=automatic (default)"
msgstr ""
#: src/xz/message.c:1195
msgid ""
"\n"
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
" --arm[=OPTS] ARM BCJ filter (little endian only)\n"
" --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
" --sparc[=OPTS] SPARC BCJ filter\n"
" Valid OPTS for all BCJ filters:\n"
" start=NUM start offset for conversions (default=0)"
msgstr ""
#: src/xz/message.c:1207
msgid ""
"\n"
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
" dist=NUM distance between bytes being subtracted\n"
" from each other (1-256; 1)"
msgstr ""
#: src/xz/message.c:1215
msgid ""
"\n"
" Other options:\n"
msgstr ""
"\n"
"Andre tilvalg:\n"
#: src/xz/message.c:1218
msgid ""
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
" -v, --verbose be verbose; specify twice for even more verbose"
msgstr ""
#: src/xz/message.c:1223
msgid " -Q, --no-warn make warnings not affect the exit status"
msgstr ""
#: src/xz/message.c:1225
msgid " --robot use machine-parsable messages (useful for scripts)"
msgstr ""
" --robot brug beskeder der kan fortolkes maskinelt (nyttigt\n"
" for skripter)"
#: src/xz/message.c:1228
msgid ""
" --info-memory display the total amount of RAM and the currently active\n"
" memory usage limits, and exit"
msgstr ""
#: src/xz/message.c:1231
msgid ""
" -h, --help display the short help (lists only the basic options)\n"
" -H, --long-help display this long help and exit"
msgstr ""
" -h, --help vis den korte hjælpetekst (viser kun grundlæggende\n"
" tilvalg)\n"
" -H, --long-help vis den lange hjælpetekst og afslut"
#: src/xz/message.c:1235
msgid ""
" -h, --help display this short help and exit\n"
" -H, --long-help display the long help (lists also the advanced options)"
msgstr ""
" -h, --help vis den korte hjælpetekst og afslut\n"
" -H, --long-help vis den lange hjælpetekst (viser også de avancerede\n"
" tilvalg)"
#: src/xz/message.c:1240
msgid " -V, --version display the version number and exit"
msgstr " -V, --version vis versionsnummer og afslut"
#: src/xz/message.c:1242
msgid ""
"\n"
"With no FILE, or when FILE is -, read standard input.\n"
msgstr ""
"\n"
"Med ingen FIL, eller når FIL er -, læs standardind.\n"
#. TRANSLATORS: This message indicates the bug reporting address
#. for this package. Please add _another line_ saying
#. "Report translation bugs to <...>\n" with the email or WWW
#. address for translation bugs. Thanks.
#: src/xz/message.c:1248
#, c-format
msgid "Report bugs to <%s> (in English or Finnish).\n"
msgstr ""
"Rapporter fejl til <%s> (på engelsk eller finsk).\n"
"Rapporter oversættelsesfejl til <dansk@dansk-gruppen.dk>.\n"
#: src/xz/message.c:1250
#, c-format
msgid "%s home page: <%s>\n"
msgstr "%s hjemmeside: <%s>\n"
#: src/xz/message.c:1254
msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
msgstr "DETTE ER EN UDVIKLINGSVERSION - BRUG IKKE I PRODUKTION."
#: src/xz/options.c:86
#, c-format
msgid "%s: Options must be `name=value' pairs separated with commas"
msgstr "%s: Tilvalg skal være »navne=værdi«-par adskilt med kommaer"
#: src/xz/options.c:93
#, c-format
msgid "%s: Invalid option name"
msgstr "%s: Ugyldigt tilvalgsnavn"
#: src/xz/options.c:113
#, c-format
msgid "%s: Invalid option value"
msgstr "%s: Ugyldigt tilvalgsværdi"
#: src/xz/options.c:247
#, c-format
msgid "Unsupported LZMA1/LZMA2 preset: %s"
msgstr "LZMA1/LZMA2-forhåndskonfiguration er ikke understøttet: %s"
#: src/xz/options.c:355
msgid "The sum of lc and lp must not exceed 4"
msgstr "Summen af lc og lp må ikke være højere end 4"
#: src/xz/options.c:359
#, c-format
msgid "The selected match finder requires at least nice=%<PRIu32>"
msgstr "Den valgte matchfinder kræver mindst nice=%<PRIu32>"
#: src/xz/suffix.c:133 src/xz/suffix.c:258
#, c-format
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
msgstr "%s: med --format=raw, --suffix=.SUF er krævet med mindre der skrives til standardud"
#: src/xz/suffix.c:164
#, c-format
msgid "%s: Filename has an unknown suffix, skipping"
msgstr "%s: Filnavn har ukendt endelse, udelader"
#: src/xz/suffix.c:185
#, c-format
msgid "%s: File already has `%s' suffix, skipping"
msgstr "%s: Filen har allrede endelsen »%s«, udelader."
#: src/xz/suffix.c:393
#, c-format
msgid "%s: Invalid filename suffix"
msgstr "%s: Ugyldig filnavnendelse"
#: src/xz/util.c:71
#, c-format
msgid "%s: Value is not a non-negative decimal integer"
msgstr "%s: Værdi er ikke et positivt decimalheltal"
#: src/xz/util.c:113
#, c-format
msgid "%s: Invalid multiplier suffix"
msgstr "%s: Ugyldig multiplikatorendelse"
#: src/xz/util.c:115
msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
msgstr "Gyldige endelser er »KiB« (2^10), »MiB« (2^20) og »GiB« (2^30)."
#: src/xz/util.c:132
#, c-format
msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
msgstr "Værdien for tilvalget »%s« skal være i intervallet [%<PRIu64>, %<PRIu64>]"
#: src/xz/util.c:257
msgid "Empty filename, skipping"
msgstr "Tomt filnavn, udelader"
#: src/xz/util.c:271
msgid "Compressed data cannot be read from a terminal"
msgstr "Komprimerede data kan ikke læses fra en terminal"
#: src/xz/util.c:284
msgid "Compressed data cannot be written to a terminal"
msgstr "Komprimerede data kan ikke skrives til en terminal"
#: src/common/tuklib_exit.c:39
msgid "Writing to standard output failed"
msgstr "Skrivning til standardud mislykkedes"
#: src/common/tuklib_exit.c:42
msgid "Unknown error"
msgstr "Ukendt fejl"

635
po/de.po

File diff suppressed because it is too large Load Diff

974
po/fi.po Normal file
View File

@ -0,0 +1,974 @@
# Finnish translations for xz package
# Suomenkielinen käännös xz-paketille.
# This file is put in the public domain.
# Lauri Nurmi <lanurmi@iki.fi>, 2019, 2020.
#
msgid ""
msgstr ""
"Project-Id-Version: xz 5.2.4\n"
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
"POT-Creation-Date: 2018-04-29 18:19+0300\n"
"PO-Revision-Date: 2020-02-14 18:33+0200\n"
"Last-Translator: Lauri Nurmi <lanurmi@iki.fi>\n"
"Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
"Language: fi\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.2.4\n"
#: src/xz/args.c:63
#, c-format
msgid "%s: Invalid argument to --block-list"
msgstr "%s: Virheellinen argumentti valitsimelle --block-list"
#: src/xz/args.c:73
#, c-format
msgid "%s: Too many arguments to --block-list"
msgstr "%s: Liian monta argumenttia valitsimelle --block-list"
#: src/xz/args.c:102
msgid "0 can only be used as the last element in --block-list"
msgstr "0:aa voi käyttää vain viimeisenä alkiona valitsimen --block-list kanssa"
#: src/xz/args.c:406
#, c-format
msgid "%s: Unknown file format type"
msgstr "%s: Tuntematon tiedostomuototyyppi"
#: src/xz/args.c:429 src/xz/args.c:437
#, c-format
msgid "%s: Unsupported integrity check type"
msgstr "%s: Eheystarkistuksen tyyppiä ei tueta"
#: src/xz/args.c:473
msgid "Only one file can be specified with `--files' or `--files0'."
msgstr "Vain yksi tiedosto voidaan antaa valitsimille ”--files” ja ”--files0”."
#: src/xz/args.c:541
#, c-format
msgid "The environment variable %s contains too many arguments"
msgstr "Ympäristömuuttuja %s sisältää liian monta argumenttia"
#: src/xz/args.c:643
msgid "Compression support was disabled at build time"
msgstr "Tiivistämistuki on poistettu käytöstä käännösaikana"
#: src/xz/args.c:650
msgid "Decompression support was disabled at build time"
msgstr "Purkutuki on poistettu käytöstä käännösaikana"
#: src/xz/coder.c:110
msgid "Maximum number of filters is four"
msgstr "Suodattimien enimmäismäärä on neljä"
#: src/xz/coder.c:129
msgid "Memory usage limit is too low for the given filter setup."
msgstr "Muistinkäytön raja on liian matala valituille suotimille."
#: src/xz/coder.c:159
msgid "Using a preset in raw mode is discouraged."
msgstr "Esiasetusten käyttö raw-tilassa ei ole suositeltavaa."
#: src/xz/coder.c:161
msgid "The exact options of the presets may vary between software versions."
msgstr "Esiasetusten tarkat asetukset saattavat vaihdella ohjelmistoversioiden välillä."
#: src/xz/coder.c:184
msgid "The .lzma format supports only the LZMA1 filter"
msgstr ".lzma-muoto tukee vain LZMA1-suodinta"
#: src/xz/coder.c:192
msgid "LZMA1 cannot be used with the .xz format"
msgstr "LZMA1:tä ei voi käyttää .xz-muodon kanssa"
#: src/xz/coder.c:209
msgid "The filter chain is incompatible with --flush-timeout"
msgstr "Suodinketju on yhteensopimaton valitsimen --flush-timeout kanssa"
#: src/xz/coder.c:215
msgid "Switching to single-threaded mode due to --flush-timeout"
msgstr "Vaihdetaan yksisäikeiseen tilaan valitsimen --flush-timeout vuoksi"
#: src/xz/coder.c:235
#, c-format
msgid "Using up to %<PRIu32> threads."
msgstr "Käytetään enintään %<PRIu32> säiettä."
#: src/xz/coder.c:251
msgid "Unsupported filter chain or filter options"
msgstr "Ei-tuettu suodinketju tai suotimen asetukset"
#: src/xz/coder.c:263
#, c-format
msgid "Decompression will need %s MiB of memory."
msgstr "Purkaminen vaatii %s MiB muistia."
#: src/xz/coder.c:300
#, c-format
msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
msgstr "Pudotettiin säikeiden määrä %s säikeestä %s:een, jottei ylitettäisi %s MiB:n rajaa muistinkäytölle"
#: src/xz/coder.c:354
#, c-format
msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
msgstr "Pudotettiin LZMA%c-sanaston koko %s MiB:stä %s MiB:hen, jottei ylitettäisi %s MiB:n rajaa muistinkäytölle"
#: src/xz/file_io.c:110 src/xz/file_io.c:118
#, c-format
msgid "Error creating a pipe: %s"
msgstr "Virhe putkea luodessa: %s"
#: src/xz/file_io.c:173
msgid "Sandbox is disabled due to incompatible command line arguments"
msgstr "Hiekkalaatikko on poistettu käytöstä yhteensopimattomien komentoriviargumenttien vuoksi"
#: src/xz/file_io.c:216
msgid "Sandbox was successfully enabled"
msgstr "Hiekkalaatikko otettiin onnistuneesti käyttöön"
#: src/xz/file_io.c:220
msgid "Failed to enable the sandbox"
msgstr "Hiekkalaatikon ottaminen käyttöön epäonnistui"
#: src/xz/file_io.c:262
#, c-format
msgid "%s: poll() failed: %s"
msgstr "%s: poll()-kutsu epäonnistui: %s"
#. TRANSLATORS: When compression or decompression finishes,
#. and xz is going to remove the source file, xz first checks
#. if the source file still exists, and if it does, does its
#. device and inode numbers match what xz saw when it opened
#. the source file. If these checks fail, this message is
#. shown, %s being the filename, and the file is not deleted.
#. The check for device and inode numbers is there, because
#. it is possible that the user has put a new file in place
#. of the original file, and in that case it obviously
#. shouldn't be removed.
#: src/xz/file_io.c:332
#, c-format
msgid "%s: File seems to have been moved, not removing"
msgstr "%s: Tiedosto on nähtävästi siirretty, ei poisteta"
#: src/xz/file_io.c:339 src/xz/file_io.c:878
#, c-format
msgid "%s: Cannot remove: %s"
msgstr "%s: Ei voi poistaa: %s"
#: src/xz/file_io.c:364
#, c-format
msgid "%s: Cannot set the file owner: %s"
msgstr "%s: Tiedoston omistajaa ei voi asettaa: %s"
#: src/xz/file_io.c:370
#, c-format
msgid "%s: Cannot set the file group: %s"
msgstr "%s: Tiedoston ryhmää ei voi asettaa: %s"
#: src/xz/file_io.c:389
#, c-format
msgid "%s: Cannot set the file permissions: %s"
msgstr "%s: Tiedoston oikeuksia ei voi asettaa: %s"
#: src/xz/file_io.c:515
#, c-format
msgid "Error getting the file status flags from standard input: %s"
msgstr "Virhe tiedoston tilalippujen noutamisessa vakiosyötteelle: %s"
#: src/xz/file_io.c:572 src/xz/file_io.c:634
#, c-format
msgid "%s: Is a symbolic link, skipping"
msgstr "%s: On symbolinen linkki, ohitetaan"
#: src/xz/file_io.c:663
#, c-format
msgid "%s: Is a directory, skipping"
msgstr "%s: On hakemisto, ohitetaan"
#: src/xz/file_io.c:669
#, c-format
msgid "%s: Not a regular file, skipping"
msgstr "%s: Ei ole tavallinen tiedosto, ohitetaan"
#: src/xz/file_io.c:686
#, c-format
msgid "%s: File has setuid or setgid bit set, skipping"
msgstr "%s: Tiedostolla on setuid- tai setgid-bitti, ohitetaan"
#: src/xz/file_io.c:693
#, c-format
msgid "%s: File has sticky bit set, skipping"
msgstr "%s: Tiedostolla on sticky-bitti, ohitetaan"
#: src/xz/file_io.c:700
#, c-format
msgid "%s: Input file has more than one hard link, skipping"
msgstr "%s: Syötetiedostoon on yli yksi kova linkki, ohitetaan"
#: src/xz/file_io.c:788
#, c-format
msgid "Error restoring the status flags to standard input: %s"
msgstr "Virhe tilalippujen palauttamisessa vakiosyötteelle: %s"
#: src/xz/file_io.c:836
#, c-format
msgid "Error getting the file status flags from standard output: %s"
msgstr "Virhe tiedoston tilalippujen noutamisessa vakiotulosteelle: %s"
#: src/xz/file_io.c:1014
#, c-format
msgid "Error restoring the O_APPEND flag to standard output: %s"
msgstr "Virhe O_APPEND-lipun palauttamisessa vakiosyötteelle: %s"
#: src/xz/file_io.c:1026
#, c-format
msgid "%s: Closing the file failed: %s"
msgstr "%s: Tiedoston sulkeminen epäonnistui: %s"
#: src/xz/file_io.c:1062 src/xz/file_io.c:1288
#, c-format
msgid "%s: Seeking failed when trying to create a sparse file: %s"
msgstr "%s: Siirtyminen epäonnistui yritettäessä luoda hajanaista tiedostoa: %s"
#: src/xz/file_io.c:1157
#, c-format
msgid "%s: Read error: %s"
msgstr "%s: Lukuvirhe: %s"
#: src/xz/file_io.c:1177
#, c-format
msgid "%s: Error seeking the file: %s"
msgstr "%s: Virhe tiedostossa siirtymisessä: %s"
#: src/xz/file_io.c:1187
#, c-format
msgid "%s: Unexpected end of file"
msgstr "%s: Odottamaton tiedoston loppu"
#: src/xz/file_io.c:1246
#, c-format
msgid "%s: Write error: %s"
msgstr "%s: Kirjoitusvirhe: %s"
#: src/xz/hardware.c:107
msgid "Disabled"
msgstr "Pois käytöstä"
#. TRANSLATORS: Test with "xz --info-memory" to see if
#. the alignment looks nice.
#: src/xz/hardware.c:126
msgid "Total amount of physical memory (RAM): "
msgstr "Fyysisen muistin kokonaismäärä (RAM): "
#: src/xz/hardware.c:128
msgid "Memory usage limit for compression: "
msgstr "Muistinkäytön raja tiivistykselle: "
#: src/xz/hardware.c:130
msgid "Memory usage limit for decompression: "
msgstr "Muistinkäytön raja purkamiselle: "
#. TRANSLATORS: Indicates that there is no integrity check.
#. This string is used in tables, so the width must not
#. exceed ten columns with a fixed-width font.
#: src/xz/list.c:65
msgid "None"
msgstr "Ei mitään"
#. TRANSLATORS: Indicates that integrity check name is not known,
#. but the Check ID is known (here 2). This and other "Unknown-N"
#. strings are used in tables, so the width must not exceed ten
#. columns with a fixed-width font. It's OK to omit the dash if
#. you need space for one extra letter, but don't use spaces.
#: src/xz/list.c:72
msgid "Unknown-2"
msgstr "Tuntematon-2"
#: src/xz/list.c:73
msgid "Unknown-3"
msgstr "Tuntematon-3"
#: src/xz/list.c:75
msgid "Unknown-5"
msgstr "Tuntematon-5"
#: src/xz/list.c:76
msgid "Unknown-6"
msgstr "Tuntematon-6"
#: src/xz/list.c:77
msgid "Unknown-7"
msgstr "Tuntematon-7"
#: src/xz/list.c:78
msgid "Unknown-8"
msgstr "Tuntematon-8"
#: src/xz/list.c:79
msgid "Unknown-9"
msgstr "Tuntematon-9"
#: src/xz/list.c:81
msgid "Unknown-11"
msgstr "Tuntematon-11"
#: src/xz/list.c:82
msgid "Unknown-12"
msgstr "Tuntematon-12"
#: src/xz/list.c:83
msgid "Unknown-13"
msgstr "Tuntematon-13"
#: src/xz/list.c:84
msgid "Unknown-14"
msgstr "Tuntematon-14"
#: src/xz/list.c:85
msgid "Unknown-15"
msgstr "Tuntematon-15"
#: src/xz/list.c:153
#, c-format
msgid "%s: File is empty"
msgstr "%s: Tiedosto on tyhjä"
#: src/xz/list.c:158
#, c-format
msgid "%s: Too small to be a valid .xz file"
msgstr "%s: Liian pieni kelvolliseksi .xz-tiedostoksi"
#. TRANSLATORS: These are column headings. From Strms (Streams)
#. to Ratio, the columns are right aligned. Check and Filename
#. are left aligned. If you need longer words, it's OK to
#. use two lines here. Test with "xz -l foo.xz".
#: src/xz/list.c:677
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
msgstr "Virrat Lohkot Tiivist. Tiivistämätön Suhde Tark. Tiedostonimi"
#: src/xz/list.c:717
#, c-format
msgid " Streams: %s\n"
msgstr " Virrat: %s\n"
#: src/xz/list.c:719
#, c-format
msgid " Blocks: %s\n"
msgstr " Lohkot: %s\n"
#: src/xz/list.c:721
#, c-format
msgid " Compressed size: %s\n"
msgstr " Tiivistetty koko: %s\n"
#: src/xz/list.c:724
#, c-format
msgid " Uncompressed size: %s\n"
msgstr " Tiivistämätön koko: %s\n"
#: src/xz/list.c:727
#, c-format
msgid " Ratio: %s\n"
msgstr " Suhde: %s\n"
#: src/xz/list.c:729
#, c-format
msgid " Check: %s\n"
msgstr " Tarkistus: %s\n"
#: src/xz/list.c:730
#, c-format
msgid " Stream padding: %s\n"
msgstr " Virran tasaus: %s\n"
#. TRANSLATORS: The second line is column headings. All except
#. Check are right aligned; Check is left aligned. Test with
#. "xz -lv foo.xz".
#: src/xz/list.c:758
msgid ""
" Streams:\n"
" Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
msgstr ""
" Virrat:\n"
" Virta Lohkot TiivSiirr. Tv:tönSiirr. TiivKoko Tv:tönKoko Suhde Tark. Tasaus"
#. TRANSLATORS: The second line is column headings. All
#. except Check are right aligned; Check is left aligned.
#: src/xz/list.c:813
#, c-format
msgid ""
" Blocks:\n"
" Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
msgstr ""
" Lohkot:\n"
" Virta Lohko TiivSiirr. Tv:tönSiirr. Yht.Koko Tv:tönKoko Suhde Tark."
#. TRANSLATORS: These are additional column headings
#. for the most verbose listing mode. CheckVal
#. (Check value), Flags, and Filters are left aligned.
#. Header (Block Header Size), CompSize, and MemUsage
#. are right aligned. %*s is replaced with 0-120
#. spaces to make the CheckVal column wide enough.
#. Test with "xz -lvv foo.xz".
#: src/xz/list.c:825
#, c-format
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
msgstr " Tark.arvo%*s Otsake Liput TiivKoko Muist.käyt. Suotimet"
#: src/xz/list.c:903 src/xz/list.c:1078
#, c-format
msgid " Memory needed: %s MiB\n"
msgstr " Tarvittava muisti: %s MiB\n"
#: src/xz/list.c:905 src/xz/list.c:1080
#, c-format
msgid " Sizes in headers: %s\n"
msgstr " Koot otsakkeissa: %s\n"
#: src/xz/list.c:906 src/xz/list.c:1081
msgid "Yes"
msgstr "Kyllä"
#: src/xz/list.c:906 src/xz/list.c:1081
msgid "No"
msgstr "Ei"
#: src/xz/list.c:907 src/xz/list.c:1082
#, c-format
msgid " Minimum XZ Utils version: %s\n"
msgstr " XZ Utilsin vähimmäisversio: %s\n"
#. TRANSLATORS: %s is an integer. Only the plural form of this
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
#: src/xz/list.c:1057
#, c-format
msgid "%s file\n"
msgid_plural "%s files\n"
msgstr[0] "%s tiedosto\n"
msgstr[1] "%s tiedostoa\n"
#: src/xz/list.c:1070
msgid "Totals:"
msgstr "Yhteensä:"
#: src/xz/list.c:1071
#, c-format
msgid " Number of files: %s\n"
msgstr " Tiedostojen määrä: %s\n"
#: src/xz/list.c:1146
msgid "--list works only on .xz files (--format=xz or --format=auto)"
msgstr "--list toimii vain .xz-tiedostoille (--format=xz tai --format=auto)"
#: src/xz/list.c:1152
msgid "--list does not support reading from standard input"
msgstr "--list ei tue lukemista vakiosyötteestä"
#: src/xz/main.c:89
#, c-format
msgid "%s: Error reading filenames: %s"
msgstr "%s: Virhe luettaessa tiedostonimiä: %s"
#: src/xz/main.c:96
#, c-format
msgid "%s: Unexpected end of input when reading filenames"
msgstr "%s: Odottamaton syötteen loppu tiedostonimiä luettaessa"
#: src/xz/main.c:120
#, c-format
msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
msgstr "%s: Nul-merkki kohdattiin tiedostonimiä lukiessa; oliko tarkoitus antaa valitsin ”--files0” eikä ”--files”?"
#: src/xz/main.c:174
msgid "Compression and decompression with --robot are not supported yet."
msgstr "Tiivistys ja purku --robot -valitsimen kanssa eivät ole vielä tuettuja."
#: src/xz/main.c:252
msgid "Cannot read data from standard input when reading filenames from standard input"
msgstr "Dataa ei voi lukea vakiosyötteestä kun tiedostonimiä luetaan vakiosyötteestä"
#. TRANSLATORS: This is the program name in the beginning
#. of the line in messages. Usually it becomes "xz: ".
#. This is a translatable string because French needs
#. a space before a colon.
#: src/xz/message.c:714
#, c-format
msgid "%s: "
msgstr "%s: "
#: src/xz/message.c:777 src/xz/message.c:827
msgid "Internal error (bug)"
msgstr "Sisäinen virhe (ohjelmistovika)"
#: src/xz/message.c:784
msgid "Cannot establish signal handlers"
msgstr "Signaalinkäsittelimiä ei voi muodostaa"
#: src/xz/message.c:793
msgid "No integrity check; not verifying file integrity"
msgstr "Ei eheystarkastusta; ei varmenneta tiedoston eheyttä"
#: src/xz/message.c:796
msgid "Unsupported type of integrity check; not verifying file integrity"
msgstr "Ei-tuettu eheystarkastuksen tyyppi; ei varmenneta tiedoston eheyttä"
#: src/xz/message.c:803
msgid "Memory usage limit reached"
msgstr "Muistinkäytön raja saavutettu"
#: src/xz/message.c:806
msgid "File format not recognized"
msgstr "Tiedostomuotoa ei tunnistettu"
#: src/xz/message.c:809
msgid "Unsupported options"
msgstr "Ei-tuetut valitsimet"
#: src/xz/message.c:812
msgid "Compressed data is corrupt"
msgstr "Tiivistetty data on turmeltunut"
#: src/xz/message.c:815
msgid "Unexpected end of input"
msgstr "Odottamaton syötteen loppu"
#: src/xz/message.c:848
#, c-format
msgid "%s MiB of memory is required. The limiter is disabled."
msgstr "%s MiB muistia vaaditaan. Rajoitin on poistettu käytöstä."
#: src/xz/message.c:876
#, c-format
msgid "%s MiB of memory is required. The limit is %s."
msgstr "%s MiB muistia vaaditaan. Raja on %s."
#: src/xz/message.c:1043
#, c-format
msgid "%s: Filter chain: %s\n"
msgstr "%s: Suodinketju: %s\n"
#: src/xz/message.c:1053
#, c-format
msgid "Try `%s --help' for more information."
msgstr "Komento ”%s --help” antaa lisää tietoa."
#: src/xz/message.c:1079
#, c-format
msgid ""
"Usage: %s [OPTION]... [FILE]...\n"
"Compress or decompress FILEs in the .xz format.\n"
"\n"
msgstr ""
"Käyttö: %s [VALITSIN]... [TIEDOSTO]...\n"
"Tiivistä tai pura .xz-muotoisia TIEDOSTOja.\n"
"\n"
#: src/xz/message.c:1086
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
msgstr "Pitkien valitsinten pakolliset argumentit ovat pakollisia myös lyhyille.\n"
#: src/xz/message.c:1090
msgid " Operation mode:\n"
msgstr " Toimintatila:\n"
#: src/xz/message.c:1093
msgid ""
" -z, --compress force compression\n"
" -d, --decompress force decompression\n"
" -t, --test test compressed file integrity\n"
" -l, --list list information about .xz files"
msgstr ""
" -z, --compress pakota tiivistys\n"
" -d, --decompress pakota purku\n"
" -t, --test testaa tiivistetyn tiedoston eheys\n"
" -l, --list näytä tietoja .xz-tiedostoista"
#: src/xz/message.c:1099
msgid ""
"\n"
" Operation modifiers:\n"
msgstr ""
"\n"
" Toimintomääreet:\n"
#: src/xz/message.c:1102
msgid ""
" -k, --keep keep (don't delete) input files\n"
" -f, --force force overwrite of output file and (de)compress links\n"
" -c, --stdout write to standard output and don't delete input files"
msgstr ""
" -k, --keep säilytä (poistamatta) syötetiedostot\n"
" -f, --force pakota tulostiedostojen ylikirjoitus ja pura/tiivistä\n"
" linkit\n"
" -c, --stdout kirjoita vakiotulosteeseen äläkä poista syötetiedostoja"
#: src/xz/message.c:1108
msgid ""
" --single-stream decompress only the first stream, and silently\n"
" ignore possible remaining input data"
msgstr ""
" --single-stream pura vain ensimmäinen virta, ja ohita\n"
" hiljaisesti mahdollinen jäljellä oleva syötedata"
#: src/xz/message.c:1111
msgid ""
" --no-sparse do not create sparse files when decompressing\n"
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
" --files[=FILE] read filenames to process from FILE; if FILE is\n"
" omitted, filenames are read from the standard input;\n"
" filenames must be terminated with the newline character\n"
" --files0[=FILE] like --files but use the null character as terminator"
msgstr ""
" --no-sparse älä luo hajanaisia tiedostoja purettaessa\n"
" -S, --suffix=.PÄÄTE käytä ”.PÄÄTE”-päätettä tiivistetyille tiedostoille\n"
" --files[=TIED] lue käsiteltävät tiedostonimet TIEDostosta; jos TIED\n"
" jätetään antamatta, tiedostonimet luetaan vakiosyötteestä;\n"
" tiedostonimet on päätettävä rivinvaihtomerkillä\n"
" --files0[=TIED] kuten --files mutta käytä päättämiseen nul-merkkiä"
#: src/xz/message.c:1120
msgid ""
"\n"
" Basic file format and compression options:\n"
msgstr ""
"\n"
" Tiedostomuodon ja tiivistyksen perusvalitsimet:\n"
#: src/xz/message.c:1122
msgid ""
" -F, --format=FMT file format to encode or decode; possible values are\n"
" `auto' (default), `xz', `lzma', and `raw'\n"
" -C, --check=CHECK integrity check type: `none' (use with caution),\n"
" `crc32', `crc64' (default), or `sha256'"
msgstr ""
" -F, --format=MUOTO tuotettava tai luettava tiedostomuotoa; vaihtoehdot\n"
" ovat ”auto” (oletus), ”xz”, ”lzma” ja ”raw”\n"
" -C, --check=CHECK eheystarkastuksen tyyppi: ”none” (käytä varoen),\n"
" ”crc32”, ”crc64” (oletus) tai ”sha256”"
#: src/xz/message.c:1127
msgid " --ignore-check don't verify the integrity check when decompressing"
msgstr " --ignore-check älä suorita eheystarkastusta purettaessa"
#: src/xz/message.c:1131
msgid ""
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
" decompressor memory usage into account before using 7-9!"
msgstr ""
" -0 ... -9 tiivistyksen esiasetus; oletus on 6; ota tiivistyksen\n"
" *ja* purun muistinkäyttö huomioon ennen kuin käytät\n"
" arvoja 79!"
#: src/xz/message.c:1135
msgid ""
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
" does not affect decompressor memory requirements"
msgstr ""
" -e, --extreme yritä parantaa tiivistyssuhdetta käyttämällä enemmän\n"
" suoritinaikaa; ei vaikuta purkimen muistivaatimuksiin"
#: src/xz/message.c:1139
msgid ""
" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
" to use as many threads as there are processor cores"
msgstr ""
" -T, --threads=MÄÄRÄ käytä enintää MÄÄRÄä säiettä; oletus on 1; asettamalla\n"
" 0:ksi käytetään suoritinytimien määrän verran säikeitä"
#: src/xz/message.c:1144
msgid ""
" --block-size=SIZE\n"
" start a new .xz block after every SIZE bytes of input;\n"
" use this to set the block size for threaded compression"
msgstr ""
" --block-size=KOKO\n"
" aloita uusi .xz-lohko aina KOKO syötetavun jälkeen; käytä\n"
" tätä säikeistetyn tiivistyksen lohkokoon asettamiseen"
#: src/xz/message.c:1148
msgid ""
" --block-list=SIZES\n"
" start a new .xz block after the given comma-separated\n"
" intervals of uncompressed data"
msgstr ""
" --block-list=KOOT\n"
" aloita uusi .xz-lohko kun tiivistämätöntä dataa on\n"
" käsitelty pilkuilla erotellut tavumäärät"
# FIXME: tarvitaan kiva suomenkielinen termi block-verbille tässä merkityksessä
#: src/xz/message.c:1152
msgid ""
" --flush-timeout=TIMEOUT\n"
" when compressing, if more than TIMEOUT milliseconds has\n"
" passed since the previous flush and reading more input\n"
" would block, all pending data is flushed out"
msgstr ""
" --flush-timeout=AIKAKATKAISU\n"
" jos tiivistettäessä on kulunut yli AIKAKATKAISU ms\n"
" edellisestä huuhtomisesta ja syötteen lukemisen\n"
" jatkaminen pysähtyisi, kaikki odottava data huuhdellaan"
#: src/xz/message.c:1158
#, no-c-format
msgid ""
" --memlimit-compress=LIMIT\n"
" --memlimit-decompress=LIMIT\n"
" -M, --memlimit=LIMIT\n"
" set memory usage limit for compression, decompression,\n"
" or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
msgstr ""
" --memlimit-compress=RAJA\n"
" --memlimit-decompress=RAJA\n"
" -M, --memlimit=RAJA\n"
" aseta muistinkäytön raja tiivistykselle, purkamiselle\n"
" tai molemmille; RAJA on tavuja, %-osuus RAM-muistista\n"
" tai 0 oletusarvojen käyttämiseksi"
#: src/xz/message.c:1165
msgid ""
" --no-adjust if compression settings exceed the memory usage limit,\n"
" give an error instead of adjusting the settings downwards"
msgstr ""
" --no-adjust jos tiivistysasetukset ylittävät muistinkäytön rajan,\n"
" anna virhe äläkä pudota asetuksia alaspäin"
#: src/xz/message.c:1171
msgid ""
"\n"
" Custom filter chain for compression (alternative for using presets):"
msgstr ""
"\n"
" Mukautettu suodinketju tiivistykselle (vaihtoehto esiasetuksille):"
#: src/xz/message.c:1180
msgid ""
"\n"
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
" --lzma2[=OPTS] more of the following options (valid values; default):\n"
" preset=PRE reset options to a preset (0-9[e])\n"
" dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n"
" lc=NUM number of literal context bits (0-4; 3)\n"
" lp=NUM number of literal position bits (0-4; 0)\n"
" pb=NUM number of position bits (0-4; 2)\n"
" mode=MODE compression mode (fast, normal; normal)\n"
" nice=NUM nice length of a match (2-273; 64)\n"
" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n"
" depth=NUM maximum search depth; 0=automatic (default)"
msgstr ""
"\n"
" --lzma1[=ASET] LZMA1 tai LZMA2; ASETukset ovat yksi tai useampi\n"
" --lzma2[=ASET] seuraavista asetuksista pilkuilla eroteltuina\n"
" (kelvolliset arvot; oletus):\n"
" preset=ESI palauta asetukset esiasetukseen (0-9[e])\n"
" dict=LUKU sanaston koko (4KiB 1536MiB; 8MiB)\n"
" lc=LUKU literal context -bittien määrä (0-4; 3)\n"
" lp=LUKU literal position -bittien määrä (0-4; 0)\n"
" pb=LUKU position -bittien määrä (0-4; 2)\n"
" mode=TILA tiivistystila (fast, normal; normal)\n"
" nice=LUKU täsmäävyyden nice-pituus (2273; 64)\n"
" mf=NIMI täsmäävyydenetsin (hc3, hc4, bt2, bt3,\n"
" bt4; bt4)\n"
" depth=LUKU enimmäishakusyvyys; 0=automaattinen (oletus)"
#: src/xz/message.c:1195
msgid ""
"\n"
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
" --arm[=OPTS] ARM BCJ filter (little endian only)\n"
" --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
" --sparc[=OPTS] SPARC BCJ filter\n"
" Valid OPTS for all BCJ filters:\n"
" start=NUM start offset for conversions (default=0)"
msgstr ""
"\n"
" --x86[=ASET] x86:n BCJ-suodin (32- ja 64-bittiset)\n"
" --powerpc[=ASET] PowerPC:n BCJ-suodin (vain big endian)\n"
" --ia64[=ASET] IA-64:n (Itanium) BCJ-suodin\n"
" --arm[=ASET] ARMin BCJ-suodin (vain little endian)\n"
" --armthumb[=ASET] ARM-Thumbin BCJ-suodin (vain little endian)\n"
" --sparc[=ASET] SPARCin BCJ-suodin\n"
" Kelvolliset ASETukset kaikille BCJ-suotimille:\n"
" start=LUKU muunnoksien aloitussiirtymä (oletus=0)"
#: src/xz/message.c:1207
msgid ""
"\n"
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
" dist=NUM distance between bytes being subtracted\n"
" from each other (1-256; 1)"
msgstr ""
"\n"
" --delta[=ASET] Muutossuodin; kelvolliset ASETukset (kelv. arvot; oletus):\n"
" dist=LUKU toisistaan vähennettävien tavujen\n"
" välinen etäisyys (1256; 1)"
#: src/xz/message.c:1215
msgid ""
"\n"
" Other options:\n"
msgstr ""
"\n"
" Muut valitsimet:\n"
#: src/xz/message.c:1218
msgid ""
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
" -v, --verbose be verbose; specify twice for even more verbose"
msgstr ""
" -q, --quiet vaienna varoitukset; kahdesti antamalla myös virheet\n"
" -v, --verbose ole lavea; kahdesti antamalla vieläkin laveampi"
#: src/xz/message.c:1223
msgid " -Q, --no-warn make warnings not affect the exit status"
msgstr " -Q, --no-warn älkööt varoitukset vaikuttako paluuarvoon"
#: src/xz/message.c:1225
msgid " --robot use machine-parsable messages (useful for scripts)"
msgstr " --robot käytä koneluettavia viestejä (sopii skripteihin)"
#: src/xz/message.c:1228
msgid ""
" --info-memory display the total amount of RAM and the currently active\n"
" memory usage limits, and exit"
msgstr ""
" --info-memory näytä RAM-muistin kokonaismäärä ja parhaillaan\n"
" vallitsevat muistinkäytön rajat, ja poistu"
#: src/xz/message.c:1231
msgid ""
" -h, --help display the short help (lists only the basic options)\n"
" -H, --long-help display this long help and exit"
msgstr ""
" -h, --help näytä lyhyt ohje (kertoo vain perusvalitsimet)\n"
" -H, --long-help näytä tämä pitkä ohje ja poistu"
#: src/xz/message.c:1235
msgid ""
" -h, --help display this short help and exit\n"
" -H, --long-help display the long help (lists also the advanced options)"
msgstr ""
" -h, --help näytä tämä lyhyt ohje ja poistu\n"
" -H, --long-help näytä pitkä ohje (kertoo myös lisävalitsimet)"
#: src/xz/message.c:1240
msgid " -V, --version display the version number and exit"
msgstr " -V, --version näytä versionumero ja poistu"
#: src/xz/message.c:1242
msgid ""
"\n"
"With no FILE, or when FILE is -, read standard input.\n"
msgstr ""
"\n"
"Jos TIEDOSTOa ei ole annettu, tai se on ”-”, luetaan vakiosyötettä.\n"
#. TRANSLATORS: This message indicates the bug reporting address
#. for this package. Please add _another line_ saying
#. "Report translation bugs to <...>\n" with the email or WWW
#. address for translation bugs. Thanks.
#: src/xz/message.c:1248
#, c-format
msgid "Report bugs to <%s> (in English or Finnish).\n"
msgstr "Ilmoita ohjelmistovioista (suomeksi) osoitteeseen <%s>.\n"
#: src/xz/message.c:1250
#, c-format
msgid "%s home page: <%s>\n"
msgstr "%s -kotisivu: <%s>\n"
#: src/xz/message.c:1254
msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
msgstr "TÄMÄ ON KEHITYSVERSIO, JOTA EI OLE TARKOITETTU TUOTANTOKÄYTTÖÖN."
#: src/xz/options.c:86
#, c-format
msgid "%s: Options must be `name=value' pairs separated with commas"
msgstr "%s: Asetusten on oltava pilkuilla eroteltuja ”nimi=arvo” -pareja"
#: src/xz/options.c:93
#, c-format
msgid "%s: Invalid option name"
msgstr "%s: Virheellinen asetuksen nimi"
#: src/xz/options.c:113
#, c-format
msgid "%s: Invalid option value"
msgstr "%s: Virheellinen asetuksen arvo"
#: src/xz/options.c:247
#, c-format
msgid "Unsupported LZMA1/LZMA2 preset: %s"
msgstr "Ei-tuettu LZMA1/LZMA2-esiasetus: %s"
#: src/xz/options.c:355
msgid "The sum of lc and lp must not exceed 4"
msgstr "lc:n ja lp:n summa ei saa olla yli 4"
#: src/xz/options.c:359
#, c-format
msgid "The selected match finder requires at least nice=%<PRIu32>"
msgstr "Valittu täsmäävyydenetsin vaatii vähintään nice-arvon=%<PRIu32>"
#: src/xz/suffix.c:133 src/xz/suffix.c:258
#, c-format
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
msgstr "%s: --format=raw vaatii, että --suffix=.PÄÄTE on annettu, ellei kirjoiteta vakiotulosteeseen"
#: src/xz/suffix.c:164
#, c-format
msgid "%s: Filename has an unknown suffix, skipping"
msgstr "%s: Tiedostonimen pääte on tuntematon, ohitetaan"
#: src/xz/suffix.c:185
#, c-format
msgid "%s: File already has `%s' suffix, skipping"
msgstr "%s: Tiedostolla on jo ”%s”-pääte, ohitetaan"
#: src/xz/suffix.c:393
#, c-format
msgid "%s: Invalid filename suffix"
msgstr "%s: Virheellinen tiedostonimen pääte"
#: src/xz/util.c:71
#, c-format
msgid "%s: Value is not a non-negative decimal integer"
msgstr "%s: Arvo ei ole ei ole epänegatiivinen kymmenkantainen kokonaisluku"
#: src/xz/util.c:113
#, c-format
msgid "%s: Invalid multiplier suffix"
msgstr "%s: Tuntematon kerroin"
#: src/xz/util.c:115
msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
msgstr "Kelvolliset kertoimet ovat ”KiB” (2¹⁰), ”MiB” (2²⁰) ja ”GiB” (2³⁰)."
#: src/xz/util.c:132
#, c-format
msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
msgstr "Valitsimen ”%s” arvon on oltava välillä [%<PRIu64>, %<PRIu64>]"
#: src/xz/util.c:257
msgid "Empty filename, skipping"
msgstr "Tyhjä tiedostonimi, ohitetaan"
#: src/xz/util.c:271
msgid "Compressed data cannot be read from a terminal"
msgstr "Tiivistettyä dataa ei voi lukea päätteestä"
#: src/xz/util.c:284
msgid "Compressed data cannot be written to a terminal"
msgstr "Tiivistettyä dataa ei voi kirjoittaa päätteeseen"
#: src/common/tuklib_exit.c:39
msgid "Writing to standard output failed"
msgstr "Vakiotulosteeseen kirjoitus epäonnistui"
#: src/common/tuklib_exit.c:42
msgid "Unknown error"
msgstr "Tuntematon virhe"

272
po/fr.po
View File

@ -1,16 +1,18 @@
# XZ Utils French Translation # XZ Utils French Translation
# This file is put in the public domain. # This file is put in the public domain.
# Adrien Nader <adrien@notk.org>, 2011-2014. # Adrien Nader <adrien@notk.org>, 2011-2014.
# Stéphane Aulery <lkppo@free.fr>, 2019.
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: xz-utils\n" "Project-Id-Version: xz-5.2.4\n"
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n" "Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
"POT-Creation-Date: 2014-11-25 20:23+0100\n" "POT-Creation-Date: 2018-04-29 18:19+0300\n"
"PO-Revision-Date: 2010-09-24 21;12+0200\n" "PO-Revision-Date: 2019-05-12 05:46+0200\n"
"Last-Translator: Adrien Nader <adrien@notk.org>\n" "Last-Translator: Stéphane Aulery <lkppo@free.fr>\n"
"Language-Team: None\n" "Language-Team: French <traduc@traduc.org>\n"
"Language: fr\n" "Language: fr\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
@ -19,16 +21,16 @@ msgstr ""
#: src/xz/args.c:63 #: src/xz/args.c:63
#, c-format #, c-format
msgid "%s: Invalid argument to --block-list" msgid "%s: Invalid argument to --block-list"
msgstr "" msgstr "%s : argument de l'option --block-list invalide"
#: src/xz/args.c:73 #: src/xz/args.c:73
#, c-format #, c-format
msgid "%s: Too many arguments to --block-list" msgid "%s: Too many arguments to --block-list"
msgstr "" msgstr "%s : trop d'arguments pour l'option --block-list"
#: src/xz/args.c:102 #: src/xz/args.c:102
msgid "0 can only be used as the last element in --block-list" msgid "0 can only be used as the last element in --block-list"
msgstr "" msgstr "0 peut seulement être utilisé en dernier élément de --block-list"
#: src/xz/args.c:406 #: src/xz/args.c:406
#, c-format #, c-format
@ -49,6 +51,14 @@ msgstr "Un seul fichier peut être spécifié avec `--files' ou `--files0'."
msgid "The environment variable %s contains too many arguments" msgid "The environment variable %s contains too many arguments"
msgstr "La variable d'environnement %s contient trop d'arguments" msgstr "La variable d'environnement %s contient trop d'arguments"
#: src/xz/args.c:643
msgid "Compression support was disabled at build time"
msgstr "Le support de la compression à était désactivé lors de la compilaton"
#: src/xz/args.c:650
msgid "Decompression support was disabled at build time"
msgstr "Le support de la décompression a été désactivé lors de la compilation"
#: src/xz/coder.c:110 #: src/xz/coder.c:110
msgid "Maximum number of filters is four" msgid "Maximum number of filters is four"
msgstr "Le nombre maximal de filtres est quatre" msgstr "Le nombre maximal de filtres est quatre"
@ -75,42 +85,54 @@ msgstr "Le filtre LZMA1 ne peut être utilisé avec le format .xz"
#: src/xz/coder.c:209 #: src/xz/coder.c:209
msgid "The filter chain is incompatible with --flush-timeout" msgid "The filter chain is incompatible with --flush-timeout"
msgstr "" msgstr "La Chaine de filtre est incompatible avec --flush-timeout"
#: src/xz/coder.c:215 #: src/xz/coder.c:215
msgid "Switching to single-threaded mode due to --flush-timeout" msgid "Switching to single-threaded mode due to --flush-timeout"
msgstr "" msgstr "Bascule en mode mono-processus à cause de --flush-timeout"
#: src/xz/coder.c:234 #: src/xz/coder.c:235
#, c-format #, c-format
msgid "Using up to %<PRIu32> threads." msgid "Using up to %<PRIu32> threads."
msgstr "Jusqu'à %<PRIu32> threads seront utilisés." msgstr "Jusqu'à %<PRIu32> threads seront utilisés."
#: src/xz/coder.c:247 #: src/xz/coder.c:251
msgid "Unsupported filter chain or filter options" msgid "Unsupported filter chain or filter options"
msgstr "Enchaînement ou options de filtres non pris en charge" msgstr "Enchaînement ou options de filtres non pris en charge"
#: src/xz/coder.c:255 #: src/xz/coder.c:263
#, c-format #, c-format
msgid "Decompression will need %s MiB of memory." msgid "Decompression will need %s MiB of memory."
msgstr "La décompression nécessitera %s MiB de mémoire." msgstr "La décompression nécessitera %s MiB de mémoire."
#: src/xz/coder.c:290 #: src/xz/coder.c:300
#, c-format #, c-format
msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
msgstr "Nombre de threads réduit de %s à %s pour ne pas dépasser la limite d'utilisation mémoire de %s MiB" msgstr "Nombre de threads réduit de %s à %s pour ne pas dépasser la limite d'utilisation mémoire de %s MiB"
#: src/xz/coder.c:344 #: src/xz/coder.c:354
#, c-format #, c-format
msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB" msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
msgstr "Taille du dictionnaire LZMA%c réduite de %s MiB à %s MiB pour ne pas dépasser la limite d'utilisation mémoire de %s MiB" msgstr "Taille du dictionnaire LZMA%c réduite de %s MiB à %s MiB pour ne pas dépasser la limite d'utilisation mémoire de %s MiB"
#: src/xz/file_io.c:90 #: src/xz/file_io.c:110 src/xz/file_io.c:118
#, c-format #, c-format
msgid "Error creating a pipe: %s" msgid "Error creating a pipe: %s"
msgstr "Impossible de créer un tube anonyme (pipe) : %s" msgstr "Impossible de créer un tube anonyme (pipe) : %s"
#: src/xz/file_io.c:166 #: src/xz/file_io.c:173
msgid "Sandbox is disabled due to incompatible command line arguments"
msgstr "La sandbox est désactivée car elle est incompatible avec les arguments passés"
#: src/xz/file_io.c:216
msgid "Sandbox was successfully enabled"
msgstr "La sandboxe a été activée avec succès"
#: src/xz/file_io.c:220
msgid "Failed to enable the sandbox"
msgstr "Echec de l'activation de la sandboxe"
#: src/xz/file_io.c:262
#, c-format #, c-format
msgid "%s: poll() failed: %s" msgid "%s: poll() failed: %s"
msgstr "%s : L'appel à la fonction poll() a échoué : %s" msgstr "%s : L'appel à la fonction poll() a échoué : %s"
@ -125,27 +147,27 @@ msgstr "%s : L'appel à la fonction poll() a échoué : %s"
#. it is possible that the user has put a new file in place #. it is possible that the user has put a new file in place
#. of the original file, and in that case it obviously #. of the original file, and in that case it obviously
#. shouldn't be removed. #. shouldn't be removed.
#: src/xz/file_io.c:236 #: src/xz/file_io.c:332
#, c-format #, c-format
msgid "%s: File seems to have been moved, not removing" msgid "%s: File seems to have been moved, not removing"
msgstr "%s : Le fichier a apparemment été déplacé, suppression annulée" msgstr "%s : Le fichier a apparemment été déplacé, suppression annulée"
#: src/xz/file_io.c:243 src/xz/file_io.c:761 #: src/xz/file_io.c:339 src/xz/file_io.c:878
#, c-format #, c-format
msgid "%s: Cannot remove: %s" msgid "%s: Cannot remove: %s"
msgstr "%s : Impossible de supprimer : %s" msgstr "%s : Impossible de supprimer : %s"
#: src/xz/file_io.c:268 #: src/xz/file_io.c:364
#, c-format #, c-format
msgid "%s: Cannot set the file owner: %s" msgid "%s: Cannot set the file owner: %s"
msgstr "%s : Impossible de modifier le propriétaire du fichier : %s" msgstr "%s : Impossible de modifier le propriétaire du fichier : %s"
#: src/xz/file_io.c:274 #: src/xz/file_io.c:370
#, c-format #, c-format
msgid "%s: Cannot set the file group: %s" msgid "%s: Cannot set the file group: %s"
msgstr "%s : Impossible de modifier le groupe propriétaire du fichier : %s" msgstr "%s : Impossible de modifier le groupe propriétaire du fichier : %s"
#: src/xz/file_io.c:293 #: src/xz/file_io.c:389
#, c-format #, c-format
msgid "%s: Cannot set the file permissions: %s" msgid "%s: Cannot set the file permissions: %s"
msgstr "%s : Impossible de modifier les permissions du fichier : %s" msgstr "%s : Impossible de modifier les permissions du fichier : %s"
@ -158,94 +180,84 @@ msgstr "%s : Impossible de modifier les permissions du fichier : %s"
# - make it more difficult to look up in search engines; it might happen one in # - make it more difficult to look up in search engines; it might happen one in
# a million times, if we dilute the error message in 20 languages, it will be # a million times, if we dilute the error message in 20 languages, it will be
# almost impossible to find an explanation and support for the error. # almost impossible to find an explanation and support for the error.
#: src/xz/file_io.c:399 #: src/xz/file_io.c:515
#, c-format #, c-format
msgid "Error getting the file status flags from standard input: %s" msgid "Error getting the file status flags from standard input: %s"
msgstr "" msgstr "Echec de la lecture du drapeau d'état du fichier depuis la sortie standard : %s"
#: src/xz/file_io.c:408 #: src/xz/file_io.c:572 src/xz/file_io.c:634
#, c-format
msgid "Error setting O_NONBLOCK on standard input: %s"
msgstr "Impossible d'établir le drapeau O_NONBLOCK sur la sortie standard : %s"
#: src/xz/file_io.c:460 src/xz/file_io.c:522
#, c-format #, c-format
msgid "%s: Is a symbolic link, skipping" msgid "%s: Is a symbolic link, skipping"
msgstr "%s est un lien symbolique : ignoré" msgstr "%s est un lien symbolique : ignoré"
#: src/xz/file_io.c:551 #: src/xz/file_io.c:663
#, c-format #, c-format
msgid "%s: Is a directory, skipping" msgid "%s: Is a directory, skipping"
msgstr "%s est un répertoire : ignoré" msgstr "%s est un répertoire : ignoré"
#: src/xz/file_io.c:557 #: src/xz/file_io.c:669
#, c-format #, c-format
msgid "%s: Not a regular file, skipping" msgid "%s: Not a regular file, skipping"
msgstr "%s n'est pas un fichier régulier : ignoré" msgstr "%s n'est pas un fichier régulier : ignoré"
#: src/xz/file_io.c:574 #: src/xz/file_io.c:686
#, c-format #, c-format
msgid "%s: File has setuid or setgid bit set, skipping" msgid "%s: File has setuid or setgid bit set, skipping"
msgstr "%s : Le fichier possède les bits `setuid' ou `setgid' : ignoré" msgstr "%s : Le fichier possède les bits `setuid' ou `setgid' : ignoré"
#: src/xz/file_io.c:581 #: src/xz/file_io.c:693
#, c-format #, c-format
msgid "%s: File has sticky bit set, skipping" msgid "%s: File has sticky bit set, skipping"
msgstr "%s : Le fichier possède le bit `sticky' : ignoré" msgstr "%s : Le fichier possède le bit `sticky' : ignoré"
#: src/xz/file_io.c:588 #: src/xz/file_io.c:700
#, c-format #, c-format
msgid "%s: Input file has more than one hard link, skipping" msgid "%s: Input file has more than one hard link, skipping"
msgstr "%s : Le fichier d'entrée a plus d'un lien matériel : ignoré" msgstr "%s : Le fichier d'entrée a plus d'un lien matériel : ignoré"
# See note from translator above titled "file status flags". # See note from translator above titled "file status flags".
#: src/xz/file_io.c:668 #: src/xz/file_io.c:788
#, c-format #, c-format
msgid "Error restoring the status flags to standard input: %s" msgid "Error restoring the status flags to standard input: %s"
msgstr "" msgstr "Erreur de restauration du drapeau d'état de l'entrée standard : %s"
# See note from translator above titled "file status flags". # See note from translator above titled "file status flags".
#: src/xz/file_io.c:714 #: src/xz/file_io.c:836
#, c-format #, c-format
msgid "Error getting the file status flags from standard output: %s" msgid "Error getting the file status flags from standard output: %s"
msgstr "" msgstr "Erreur de lecture du drapeau d'état du fichier depuis la sortie standard : %s"
#: src/xz/file_io.c:723 #: src/xz/file_io.c:1014
#, c-format
msgid "Error setting O_NONBLOCK on standard output: %s"
msgstr "Impossible d'activer le drapeau O_NONBLOCK sur la sortie standard : %s"
#: src/xz/file_io.c:896
#, c-format #, c-format
msgid "Error restoring the O_APPEND flag to standard output: %s" msgid "Error restoring the O_APPEND flag to standard output: %s"
msgstr "Impossible de rétablir le drapeau O_APPEND sur la sortie standard : %s" msgstr "Impossible de rétablir le drapeau O_APPEND sur la sortie standard : %s"
#: src/xz/file_io.c:908 #: src/xz/file_io.c:1026
#, c-format #, c-format
msgid "%s: Closing the file failed: %s" msgid "%s: Closing the file failed: %s"
msgstr "%s : Impossible de fermer le fichier : %s" msgstr "%s : Impossible de fermer le fichier : %s"
#: src/xz/file_io.c:944 src/xz/file_io.c:1170 #: src/xz/file_io.c:1062 src/xz/file_io.c:1288
#, c-format #, c-format
msgid "%s: Seeking failed when trying to create a sparse file: %s" msgid "%s: Seeking failed when trying to create a sparse file: %s"
msgstr "%s : Impossible de se déplacer dans le fichier pour créer un 'sparse file' : %s" msgstr "%s : Impossible de se déplacer dans le fichier pour créer un 'sparse file' : %s"
#: src/xz/file_io.c:1039 #: src/xz/file_io.c:1157
#, c-format #, c-format
msgid "%s: Read error: %s" msgid "%s: Read error: %s"
msgstr "%s : Erreur d'écriture : %s" msgstr "%s : Erreur d'écriture : %s"
#: src/xz/file_io.c:1059 #: src/xz/file_io.c:1177
#, c-format #, c-format
msgid "%s: Error seeking the file: %s" msgid "%s: Error seeking the file: %s"
msgstr "%s : Impossible de se déplacer dans le fichier : %s" msgstr "%s : Impossible de se déplacer dans le fichier : %s"
#: src/xz/file_io.c:1069 #: src/xz/file_io.c:1187
#, c-format #, c-format
msgid "%s: Unexpected end of file" msgid "%s: Unexpected end of file"
msgstr "%s : Fin de fichier inattendue" msgstr "%s : Fin de fichier inattendue"
#: src/xz/file_io.c:1128 #: src/xz/file_io.c:1246
#, c-format #, c-format
msgid "%s: Write error: %s" msgid "%s: Write error: %s"
msgstr "%s : Erreur d'écriture : %s" msgstr "%s : Erreur d'écriture : %s"
@ -342,41 +354,41 @@ msgstr "%s : Trop petit pour être un fichier xz valide."
#. to Ratio, the columns are right aligned. Check and Filename #. to Ratio, the columns are right aligned. Check and Filename
#. are left aligned. If you need longer words, it's OK to #. are left aligned. If you need longer words, it's OK to
#. use two lines here. Test with "xz -l foo.xz". #. use two lines here. Test with "xz -l foo.xz".
#: src/xz/list.c:671 #: src/xz/list.c:677
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
msgstr "Flux Blocs Compressé Décompressé Ratio Vérif. Nom de fichier" msgstr "Flux Blocs Compressé Décompressé Ratio Vérif. Nom de fichier"
#: src/xz/list.c:711 #: src/xz/list.c:717
#, c-format #, c-format
msgid " Streams: %s\n" msgid " Streams: %s\n"
msgstr " Flux : %s\n" msgstr " Flux : %s\n"
#: src/xz/list.c:713 #: src/xz/list.c:719
#, c-format #, c-format
msgid " Blocks: %s\n" msgid " Blocks: %s\n"
msgstr " Blocs : %s\n" msgstr " Blocs : %s\n"
#: src/xz/list.c:715 #: src/xz/list.c:721
#, c-format #, c-format
msgid " Compressed size: %s\n" msgid " Compressed size: %s\n"
msgstr " Taille données avec compression : %s\n" msgstr " Taille données avec compression : %s\n"
#: src/xz/list.c:718 #: src/xz/list.c:724
#, c-format #, c-format
msgid " Uncompressed size: %s\n" msgid " Uncompressed size: %s\n"
msgstr " Taille données sans compression : %s\n" msgstr " Taille données sans compression : %s\n"
#: src/xz/list.c:721 #: src/xz/list.c:727
#, c-format #, c-format
msgid " Ratio: %s\n" msgid " Ratio: %s\n"
msgstr " Ratio : %s\n" msgstr " Ratio : %s\n"
#: src/xz/list.c:723 #: src/xz/list.c:729
#, c-format #, c-format
msgid " Check: %s\n" msgid " Check: %s\n"
msgstr " Vérification : %s\n" msgstr " Vérification : %s\n"
#: src/xz/list.c:724 #: src/xz/list.c:730
#, c-format #, c-format
msgid " Stream padding: %s\n" msgid " Stream padding: %s\n"
msgstr " Octets de rembourrage du flux : %s\n" msgstr " Octets de rembourrage du flux : %s\n"
@ -384,7 +396,7 @@ msgstr " Octets de rembourrage du flux : %s\n"
#. TRANSLATORS: The second line is column headings. All except #. TRANSLATORS: The second line is column headings. All except
#. Check are right aligned; Check is left aligned. Test with #. Check are right aligned; Check is left aligned. Test with
#. "xz -lv foo.xz". #. "xz -lv foo.xz".
#: src/xz/list.c:752 #: src/xz/list.c:758
msgid "" msgid ""
" Streams:\n" " Streams:\n"
" Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding" " Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
@ -394,7 +406,7 @@ msgstr ""
#. TRANSLATORS: The second line is column headings. All #. TRANSLATORS: The second line is column headings. All
#. except Check are right aligned; Check is left aligned. #. except Check are right aligned; Check is left aligned.
#: src/xz/list.c:807 #: src/xz/list.c:813
#, c-format #, c-format
msgid "" msgid ""
" Blocks:\n" " Blocks:\n"
@ -410,57 +422,57 @@ msgstr ""
#. are right aligned. %*s is replaced with 0-120 #. are right aligned. %*s is replaced with 0-120
#. spaces to make the CheckVal column wide enough. #. spaces to make the CheckVal column wide enough.
#. Test with "xz -lvv foo.xz". #. Test with "xz -lvv foo.xz".
#: src/xz/list.c:819 #: src/xz/list.c:825
#, c-format #, c-format
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters" msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
msgstr " ValVérif %*sEn-tête Drapeaux TailleComp UtilMém Filtres" msgstr " ValVérif %*sEn-tête Drapeaux TailleComp UtilMém Filtres"
#: src/xz/list.c:897 src/xz/list.c:1072 #: src/xz/list.c:903 src/xz/list.c:1078
#, c-format #, c-format
msgid " Memory needed: %s MiB\n" msgid " Memory needed: %s MiB\n"
msgstr " Mémoire nécessaire : %s MiB\n" msgstr " Mémoire nécessaire : %s MiB\n"
#: src/xz/list.c:899 src/xz/list.c:1074 #: src/xz/list.c:905 src/xz/list.c:1080
#, c-format #, c-format
msgid " Sizes in headers: %s\n" msgid " Sizes in headers: %s\n"
msgstr " Tailles stockées dans l'en-tête : %s\n" msgstr " Tailles stockées dans l'en-tête : %s\n"
#: src/xz/list.c:900 src/xz/list.c:1075 #: src/xz/list.c:906 src/xz/list.c:1081
msgid "Yes" msgid "Yes"
msgstr "Oui" msgstr "Oui"
#: src/xz/list.c:900 src/xz/list.c:1075 #: src/xz/list.c:906 src/xz/list.c:1081
msgid "No" msgid "No"
msgstr "Non" msgstr "Non"
#: src/xz/list.c:901 src/xz/list.c:1076 #: src/xz/list.c:907 src/xz/list.c:1082
#, c-format #, c-format
msgid " Minimum XZ Utils version: %s\n" msgid " Minimum XZ Utils version: %s\n"
msgstr " Version minimale de XZ Utils : %s\n" msgstr " Version minimale de XZ Utils : %s\n"
#. TRANSLATORS: %s is an integer. Only the plural form of this #. TRANSLATORS: %s is an integer. Only the plural form of this
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz". #. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
#: src/xz/list.c:1051 #: src/xz/list.c:1057
#, c-format #, c-format
msgid "%s file\n" msgid "%s file\n"
msgid_plural "%s files\n" msgid_plural "%s files\n"
msgstr[0] "%s fichier\n" msgstr[0] "%s fichier\n"
msgstr[1] "%s fichiers\n" msgstr[1] "%s fichiers\n"
#: src/xz/list.c:1064 #: src/xz/list.c:1070
msgid "Totals:" msgid "Totals:"
msgstr "Totaux :" msgstr "Totaux :"
#: src/xz/list.c:1065 #: src/xz/list.c:1071
#, c-format #, c-format
msgid " Number of files: %s\n" msgid " Number of files: %s\n"
msgstr " Nombre de fichiers : %s\n" msgstr " Nombre de fichiers : %s\n"
#: src/xz/list.c:1140 #: src/xz/list.c:1146
msgid "--list works only on .xz files (--format=xz or --format=auto)" msgid "--list works only on .xz files (--format=xz or --format=auto)"
msgstr "--list ne marche que sur les fichiers .xz (--format=xz ou --format=auto)" msgstr "--list ne marche que sur les fichiers .xz (--format=xz ou --format=auto)"
#: src/xz/list.c:1146 #: src/xz/list.c:1152
msgid "--list does not support reading from standard input" msgid "--list does not support reading from standard input"
msgstr "--list est incompatible avec la lecture sur l'entrée standard" msgstr "--list est incompatible avec la lecture sur l'entrée standard"
@ -483,7 +495,7 @@ msgstr "%s : Caractère NULL détecté lors de la lecture des noms de fichiers ;
msgid "Compression and decompression with --robot are not supported yet." msgid "Compression and decompression with --robot are not supported yet."
msgstr "La compression et la décompression ne marchent pas encore avec --robot." msgstr "La compression et la décompression ne marchent pas encore avec --robot."
#: src/xz/main.c:231 #: src/xz/main.c:252
msgid "Cannot read data from standard input when reading filenames from standard input" msgid "Cannot read data from standard input when reading filenames from standard input"
msgstr "Impossible de lire à la fois les données et les noms de fichiers depuis l'entrée standard" msgstr "Impossible de lire à la fois les données et les noms de fichiers depuis l'entrée standard"
@ -491,68 +503,68 @@ msgstr "Impossible de lire à la fois les données et les noms de fichiers depui
#. of the line in messages. Usually it becomes "xz: ". #. of the line in messages. Usually it becomes "xz: ".
#. This is a translatable string because French needs #. This is a translatable string because French needs
#. a space before a colon. #. a space before a colon.
#: src/xz/message.c:713 #: src/xz/message.c:714
#, c-format #, c-format
msgid "%s: " msgid "%s: "
msgstr "%s : " msgstr "%s : "
#: src/xz/message.c:776 src/xz/message.c:826 #: src/xz/message.c:777 src/xz/message.c:827
msgid "Internal error (bug)" msgid "Internal error (bug)"
msgstr "Erreur interne (bug)" msgstr "Erreur interne (bug)"
#: src/xz/message.c:783 #: src/xz/message.c:784
msgid "Cannot establish signal handlers" msgid "Cannot establish signal handlers"
msgstr "Impossible d'installer le gestionnaire de signaux" msgstr "Impossible d'installer le gestionnaire de signaux"
#: src/xz/message.c:792 #: src/xz/message.c:793
msgid "No integrity check; not verifying file integrity" msgid "No integrity check; not verifying file integrity"
msgstr "Pas de données de vérification d'intégrité ; vérification non effectuée" msgstr "Pas de données de vérification d'intégrité ; vérification non effectuée"
#: src/xz/message.c:795 #: src/xz/message.c:796
msgid "Unsupported type of integrity check; not verifying file integrity" msgid "Unsupported type of integrity check; not verifying file integrity"
msgstr "Méthode de vérification d'intégrité non prise en charge ; vérification non effectuée" msgstr "Méthode de vérification d'intégrité non prise en charge ; vérification non effectuée"
#: src/xz/message.c:802 #: src/xz/message.c:803
msgid "Memory usage limit reached" msgid "Memory usage limit reached"
msgstr "Limite d'utilisation mémoire atteinte" msgstr "Limite d'utilisation mémoire atteinte"
#: src/xz/message.c:805 #: src/xz/message.c:806
msgid "File format not recognized" msgid "File format not recognized"
msgstr "Format de fichier inconnu" msgstr "Format de fichier inconnu"
#: src/xz/message.c:808 #: src/xz/message.c:809
msgid "Unsupported options" msgid "Unsupported options"
msgstr "Options non prises en charge" msgstr "Options non prises en charge"
#: src/xz/message.c:811 #: src/xz/message.c:812
msgid "Compressed data is corrupt" msgid "Compressed data is corrupt"
msgstr "Les données compressées sont corrompues" msgstr "Les données compressées sont corrompues"
#: src/xz/message.c:814 #: src/xz/message.c:815
msgid "Unexpected end of input" msgid "Unexpected end of input"
msgstr "Fin des données inattendue " msgstr "Fin des données inattendue "
#: src/xz/message.c:847 #: src/xz/message.c:848
#, c-format #, c-format
msgid "%s MiB of memory is required. The limiter is disabled." msgid "%s MiB of memory is required. The limiter is disabled."
msgstr "%s MiB de mémoire sont nécessaires. La limite est désactivée." msgstr "%s MiB de mémoire sont nécessaires. La limite est désactivée."
#: src/xz/message.c:875 #: src/xz/message.c:876
#, c-format #, c-format
msgid "%s MiB of memory is required. The limit is %s." msgid "%s MiB of memory is required. The limit is %s."
msgstr "%s MiB de mémoire sont nécessaires, la limite étant %s." msgstr "%s MiB de mémoire sont nécessaires, la limite étant %s."
#: src/xz/message.c:1042 #: src/xz/message.c:1043
#, c-format #, c-format
msgid "%s: Filter chain: %s\n" msgid "%s: Filter chain: %s\n"
msgstr "%s : Enchaînement de filtres : %s\n" msgstr "%s : Enchaînement de filtres : %s\n"
#: src/xz/message.c:1052 #: src/xz/message.c:1053
#, c-format #, c-format
msgid "Try `%s --help' for more information." msgid "Try `%s --help' for more information."
msgstr "Éxécutez `%s --help' pour obtenir davantage d'informations." msgstr "Éxécutez `%s --help' pour obtenir davantage d'informations."
#: src/xz/message.c:1078 #: src/xz/message.c:1079
#, c-format #, c-format
msgid "" msgid ""
"Usage: %s [OPTION]... [FILE]...\n" "Usage: %s [OPTION]... [FILE]...\n"
@ -563,17 +575,17 @@ msgstr ""
"Compresse ou decompresse FICHIER(s) au format .xz.\n" "Compresse ou decompresse FICHIER(s) au format .xz.\n"
"\n" "\n"
#: src/xz/message.c:1085 #: src/xz/message.c:1086
msgid "Mandatory arguments to long options are mandatory for short options too.\n" msgid "Mandatory arguments to long options are mandatory for short options too.\n"
msgstr "" msgstr ""
"Les arguments obligatoires pour les options longues le sont aussi pour les\n" "Les arguments obligatoires pour les options longues le sont aussi pour les\n"
"options courtes.\n" "options courtes.\n"
#: src/xz/message.c:1089 #: src/xz/message.c:1090
msgid " Operation mode:\n" msgid " Operation mode:\n"
msgstr " Mode d'opération :\n" msgstr " Mode d'opération :\n"
#: src/xz/message.c:1092 #: src/xz/message.c:1093
msgid "" msgid ""
" -z, --compress force compression\n" " -z, --compress force compression\n"
" -d, --decompress force decompression\n" " -d, --decompress force decompression\n"
@ -585,7 +597,7 @@ msgstr ""
" -t, --test tester l'intégrité du fichier compressé\n" " -t, --test tester l'intégrité du fichier compressé\n"
" -l, --list lister les informations sur les fichiers .xz" " -l, --list lister les informations sur les fichiers .xz"
#: src/xz/message.c:1098 #: src/xz/message.c:1099
msgid "" msgid ""
"\n" "\n"
" Operation modifiers:\n" " Operation modifiers:\n"
@ -593,7 +605,7 @@ msgstr ""
"\n" "\n"
" Modificateurs :\n" " Modificateurs :\n"
#: src/xz/message.c:1101 #: src/xz/message.c:1102
msgid "" msgid ""
" -k, --keep keep (don't delete) input files\n" " -k, --keep keep (don't delete) input files\n"
" -f, --force force overwrite of output file and (de)compress links\n" " -f, --force force overwrite of output file and (de)compress links\n"
@ -605,7 +617,7 @@ msgstr ""
" -c, --stdout écrire sur la sortie standard et ne pas supprimer les\n" " -c, --stdout écrire sur la sortie standard et ne pas supprimer les\n"
" fichiers d'entrée" " fichiers d'entrée"
#: src/xz/message.c:1107 #: src/xz/message.c:1108
msgid "" msgid ""
" --single-stream decompress only the first stream, and silently\n" " --single-stream decompress only the first stream, and silently\n"
" ignore possible remaining input data" " ignore possible remaining input data"
@ -613,7 +625,7 @@ msgstr ""
" --single-stream décompresser uniquement le premier flux et ignorer\n" " --single-stream décompresser uniquement le premier flux et ignorer\n"
" silencieusement les données éventuellement restantes" " silencieusement les données éventuellement restantes"
#: src/xz/message.c:1110 #: src/xz/message.c:1111
msgid "" msgid ""
" --no-sparse do not create sparse files when decompressing\n" " --no-sparse do not create sparse files when decompressing\n"
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n" " -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
@ -629,7 +641,7 @@ msgstr ""
" et doivent être suivis d'un caractère retour à la ligne\n" " et doivent être suivis d'un caractère retour à la ligne\n"
" --files0[=FILE] comme --files mais avec un caractère null comme séparateur" " --files0[=FILE] comme --files mais avec un caractère null comme séparateur"
#: src/xz/message.c:1119 #: src/xz/message.c:1120
msgid "" msgid ""
"\n" "\n"
" Basic file format and compression options:\n" " Basic file format and compression options:\n"
@ -637,7 +649,7 @@ msgstr ""
"\n" "\n"
" Options basiques de format de fichier et de compression :\n" " Options basiques de format de fichier et de compression :\n"
#: src/xz/message.c:1121 #: src/xz/message.c:1122
msgid "" msgid ""
" -F, --format=FMT file format to encode or decode; possible values are\n" " -F, --format=FMT file format to encode or decode; possible values are\n"
" `auto' (default), `xz', `lzma', and `raw'\n" " `auto' (default), `xz', `lzma', and `raw'\n"
@ -649,13 +661,13 @@ msgstr ""
" -C, --check=CHECK type de vérification d'intégrité : `none' (à utiliser avec\n" " -C, --check=CHECK type de vérification d'intégrité : `none' (à utiliser avec\n"
" précaution), `crc32', `crc64' (par défaut) ou `sha256'" " précaution), `crc32', `crc64' (par défaut) ou `sha256'"
#: src/xz/message.c:1126 #: src/xz/message.c:1127
msgid " --ignore-check don't verify the integrity check when decompressing" msgid " --ignore-check don't verify the integrity check when decompressing"
msgstr "" msgstr ""
" --ignore-check ne pas vérifier l'intégrité des données lors de\n" " --ignore-check ne pas vérifier l'intégrité des données lors de\n"
" la décompression" " la décompression"
#: src/xz/message.c:1130 #: src/xz/message.c:1131
msgid "" msgid ""
" -0 ... -9 compression preset; default is 6; take compressor *and*\n" " -0 ... -9 compression preset; default is 6; take compressor *and*\n"
" decompressor memory usage into account before using 7-9!" " decompressor memory usage into account before using 7-9!"
@ -664,7 +676,7 @@ msgstr ""
" l'utilisation mémoire du compresseur *et* du décompresseur\n" " l'utilisation mémoire du compresseur *et* du décompresseur\n"
" avant d'utiliser 7, 8 ou 9 !" " avant d'utiliser 7, 8 ou 9 !"
#: src/xz/message.c:1134 #: src/xz/message.c:1135
msgid "" msgid ""
" -e, --extreme try to improve compression ratio by using more CPU time;\n" " -e, --extreme try to improve compression ratio by using more CPU time;\n"
" does not affect decompressor memory requirements" " does not affect decompressor memory requirements"
@ -673,7 +685,7 @@ msgstr ""
" de temps processeur ;\n" " de temps processeur ;\n"
" n'affecte pas les besoins mémoire du décompresseur" " n'affecte pas les besoins mémoire du décompresseur"
#: src/xz/message.c:1138 #: src/xz/message.c:1139
msgid "" msgid ""
" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n" " -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
" to use as many threads as there are processor cores" " to use as many threads as there are processor cores"
@ -682,7 +694,7 @@ msgstr ""
" valeur 0 est spéciale et équivaut au nombre de processeurs\n" " valeur 0 est spéciale et équivaut au nombre de processeurs\n"
" de la machine" " de la machine"
#: src/xz/message.c:1143 #: src/xz/message.c:1144
msgid "" msgid ""
" --block-size=SIZE\n" " --block-size=SIZE\n"
" start a new .xz block after every SIZE bytes of input;\n" " start a new .xz block after every SIZE bytes of input;\n"
@ -692,7 +704,7 @@ msgstr ""
" débuter un bloc XZ après chaque TAILLE octets de données\n" " débuter un bloc XZ après chaque TAILLE octets de données\n"
" d'entrée ; ce réglage sert pour la compression paralléle" " d'entrée ; ce réglage sert pour la compression paralléle"
#: src/xz/message.c:1147 #: src/xz/message.c:1148
msgid "" msgid ""
" --block-list=SIZES\n" " --block-list=SIZES\n"
" start a new .xz block after the given comma-separated\n" " start a new .xz block after the given comma-separated\n"
@ -702,15 +714,19 @@ msgstr ""
" débuter des blocs XZ après les TAILLES octets de données\n" " débuter des blocs XZ après les TAILLES octets de données\n"
" spécifiées avec des virgules pour séparateur" " spécifiées avec des virgules pour séparateur"
#: src/xz/message.c:1151 #: src/xz/message.c:1152
msgid "" msgid ""
" --flush-timeout=TIMEOUT\n" " --flush-timeout=TIMEOUT\n"
" when compressing, if more than TIMEOUT milliseconds has\n" " when compressing, if more than TIMEOUT milliseconds has\n"
" passed since the previous flush and reading more input\n" " passed since the previous flush and reading more input\n"
" would block, all pending data is flushed out" " would block, all pending data is flushed out"
msgstr "" msgstr ""
" --flush-timeout=TIMEOUT\n"
" pendant la compression, si plus de TIMEOUT ms ont passées\n"
" depuis le dernier flush et que la lecture est bloquée,\n"
" toutes les données en attente snt écrites"
#: src/xz/message.c:1157 #: src/xz/message.c:1158
#, no-c-format #, no-c-format
msgid "" msgid ""
" --memlimit-compress=LIMIT\n" " --memlimit-compress=LIMIT\n"
@ -726,7 +742,7 @@ msgstr ""
" décompression ou les deux ; LIMIT est en octets,\n" " décompression ou les deux ; LIMIT est en octets,\n"
" pourcentage de RAM, ou 0 pour la valeur par défaut" " pourcentage de RAM, ou 0 pour la valeur par défaut"
#: src/xz/message.c:1164 #: src/xz/message.c:1165
msgid "" msgid ""
" --no-adjust if compression settings exceed the memory usage limit,\n" " --no-adjust if compression settings exceed the memory usage limit,\n"
" give an error instead of adjusting the settings downwards" " give an error instead of adjusting the settings downwards"
@ -735,7 +751,7 @@ msgstr ""
" d'utilisation mémoire, renvoyer une erreur plutôt que de\n" " d'utilisation mémoire, renvoyer une erreur plutôt que de\n"
" diminuer les réglages" " diminuer les réglages"
#: src/xz/message.c:1170 #: src/xz/message.c:1171
msgid "" msgid ""
"\n" "\n"
" Custom filter chain for compression (alternative for using presets):" " Custom filter chain for compression (alternative for using presets):"
@ -743,7 +759,7 @@ msgstr ""
"\n" "\n"
" Chaîne de filtres de compression personnalisée (en lieu des préréglages) :" " Chaîne de filtres de compression personnalisée (en lieu des préréglages) :"
#: src/xz/message.c:1179 #: src/xz/message.c:1180
msgid "" msgid ""
"\n" "\n"
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n" " --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
@ -772,7 +788,7 @@ msgstr ""
" depth=NUM profondeur de recherche maximale ;\n" " depth=NUM profondeur de recherche maximale ;\n"
" 0=automatique (par défaut)" " 0=automatique (par défaut)"
#: src/xz/message.c:1194 #: src/xz/message.c:1195
msgid "" msgid ""
"\n" "\n"
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n" " --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
@ -794,7 +810,7 @@ msgstr ""
" OPTS valides pour tous les filtres BCJ :\n" " OPTS valides pour tous les filtres BCJ :\n"
" start=NUM position de début de la conversion (défaut=0)" " start=NUM position de début de la conversion (défaut=0)"
#: src/xz/message.c:1206 #: src/xz/message.c:1207
msgid "" msgid ""
"\n" "\n"
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n" " --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
@ -806,7 +822,7 @@ msgstr ""
" dist=NUM distance entre les octets soustraits les\n" " dist=NUM distance entre les octets soustraits les\n"
" uns aux autres (1-256 ; 1)" " uns aux autres (1-256 ; 1)"
#: src/xz/message.c:1214 #: src/xz/message.c:1215
msgid "" msgid ""
"\n" "\n"
" Other options:\n" " Other options:\n"
@ -814,7 +830,7 @@ msgstr ""
"\n" "\n"
" Autres options :\n" " Autres options :\n"
#: src/xz/message.c:1217 #: src/xz/message.c:1218
msgid "" msgid ""
" -q, --quiet suppress warnings; specify twice to suppress errors too\n" " -q, --quiet suppress warnings; specify twice to suppress errors too\n"
" -v, --verbose be verbose; specify twice for even more verbose" " -v, --verbose be verbose; specify twice for even more verbose"
@ -823,17 +839,17 @@ msgstr ""
" aussi masquer les erreurs\n" " aussi masquer les erreurs\n"
" -v, --verbose être bavard ; spécifier deux fois pour l'être davantage" " -v, --verbose être bavard ; spécifier deux fois pour l'être davantage"
#: src/xz/message.c:1222 #: src/xz/message.c:1223
msgid " -Q, --no-warn make warnings not affect the exit status" msgid " -Q, --no-warn make warnings not affect the exit status"
msgstr " -Q, --no-warn les avertissements ne modifient pas le code de sortie" msgstr " -Q, --no-warn les avertissements ne modifient pas le code de sortie"
#: src/xz/message.c:1224 #: src/xz/message.c:1225
msgid " --robot use machine-parsable messages (useful for scripts)" msgid " --robot use machine-parsable messages (useful for scripts)"
msgstr "" msgstr ""
" --robot utiliser des messages lisibles par un programme\n" " --robot utiliser des messages lisibles par un programme\n"
" (utile pour les scripts)" " (utile pour les scripts)"
#: src/xz/message.c:1227 #: src/xz/message.c:1228
msgid "" msgid ""
" --info-memory display the total amount of RAM and the currently active\n" " --info-memory display the total amount of RAM and the currently active\n"
" memory usage limits, and exit" " memory usage limits, and exit"
@ -841,7 +857,7 @@ msgstr ""
" --info-memory afficher la quantité totale de RAM ainsi que la limite\n" " --info-memory afficher la quantité totale de RAM ainsi que la limite\n"
" actuelle d'utilisation mémoire puis quitter" " actuelle d'utilisation mémoire puis quitter"
#: src/xz/message.c:1230 #: src/xz/message.c:1231
msgid "" msgid ""
" -h, --help display the short help (lists only the basic options)\n" " -h, --help display the short help (lists only the basic options)\n"
" -H, --long-help display this long help and exit" " -H, --long-help display this long help and exit"
@ -849,7 +865,7 @@ msgstr ""
" -h, --help afficher l'aide courte (ne liste que les options de base)\n" " -h, --help afficher l'aide courte (ne liste que les options de base)\n"
" -H, --long-help afficher l'aide longue (ceci) puis quitter" " -H, --long-help afficher l'aide longue (ceci) puis quitter"
#: src/xz/message.c:1234 #: src/xz/message.c:1235
msgid "" msgid ""
" -h, --help display this short help and exit\n" " -h, --help display this short help and exit\n"
" -H, --long-help display the long help (lists also the advanced options)" " -H, --long-help display the long help (lists also the advanced options)"
@ -857,11 +873,11 @@ msgstr ""
" -h, --help afficher l'aide courte (ceci) puis quitter\n" " -h, --help afficher l'aide courte (ceci) puis quitter\n"
" -H, --long-help afficher l'aide longue (liste aussi les options avancées)" " -H, --long-help afficher l'aide longue (liste aussi les options avancées)"
#: src/xz/message.c:1239 #: src/xz/message.c:1240
msgid " -V, --version display the version number and exit" msgid " -V, --version display the version number and exit"
msgstr " -V, --version afficher le numéro de version puis quitter" msgstr " -V, --version afficher le numéro de version puis quitter"
#: src/xz/message.c:1241 #: src/xz/message.c:1242
msgid "" msgid ""
"\n" "\n"
"With no FILE, or when FILE is -, read standard input.\n" "With no FILE, or when FILE is -, read standard input.\n"
@ -873,21 +889,21 @@ msgstr ""
#. for this package. Please add _another line_ saying #. for this package. Please add _another line_ saying
#. "Report translation bugs to <...>\n" with the email or WWW #. "Report translation bugs to <...>\n" with the email or WWW
#. address for translation bugs. Thanks. #. address for translation bugs. Thanks.
#: src/xz/message.c:1247 #: src/xz/message.c:1248
#, c-format #, c-format
msgid "Report bugs to <%s> (in English or Finnish).\n" msgid "Report bugs to <%s> (in English or Finnish).\n"
msgstr "" msgstr ""
"Signaler les bogues à <%s> (en anglais ou en finlandais).\n" "Signaler les bogues à <%s> (en anglais ou en finnois).\n"
"Signaler les bogues de traduction à <adrien@notk.org>.\n" "Signaler les bogues de traduction à <lkppo@free.fr>.\n"
#: src/xz/message.c:1249 #: src/xz/message.c:1250
#, c-format #, c-format
msgid "%s home page: <%s>\n" msgid "%s home page: <%s>\n"
msgstr "Page du projet %s : <%s>\n" msgstr "Page du projet %s : <%s>\n"
#: src/xz/message.c:1253 #: src/xz/message.c:1254
msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
msgstr "" msgstr "CECI EST UNE VERSION DE DEVELOPPEMENT QUI NE DOIT PAS ÊTRE UTILISEE EN PRODUCTION."
#: src/xz/options.c:86 #: src/xz/options.c:86
#, c-format #, c-format
@ -976,3 +992,9 @@ msgstr "Impossible d'écrire vers la sortie standard"
#: src/common/tuklib_exit.c:42 #: src/common/tuklib_exit.c:42
msgid "Unknown error" msgid "Unknown error"
msgstr "Erreur inconnue" msgstr "Erreur inconnue"
#~ msgid "Error setting O_NONBLOCK on standard input: %s"
#~ msgstr "Impossible d'établir le drapeau O_NONBLOCK sur la sortie standard : %s"
#~ msgid "Error setting O_NONBLOCK on standard output: %s"
#~ msgstr "Impossible d'activer le drapeau O_NONBLOCK sur la sortie standard : %s"

985
po/hu.po Normal file
View File

@ -0,0 +1,985 @@
# Hungarian translation for xz.
# This file is put in the public domain.
#
# Meskó Balázs <mesko.balazs@fsf.hu>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: xz 5.2.4\n"
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
"POT-Creation-Date: 2018-04-29 18:19+0300\n"
"PO-Revision-Date: 2019-11-18 09:57+0100\n"
"Last-Translator: Meskó Balázs <mesko.balazs@fsf.hu>\n"
"Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"
"Language: hu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 19.08.2\n"
#: src/xz/args.c:63
#, c-format
msgid "%s: Invalid argument to --block-list"
msgstr "%s: Érvénytelen argumentum a --block-list kapcsolóhoz"
#: src/xz/args.c:73
#, c-format
msgid "%s: Too many arguments to --block-list"
msgstr "%s: Túl sok argumentum a --block-list kapcsolóhoz"
#: src/xz/args.c:102
msgid "0 can only be used as the last element in --block-list"
msgstr "A 0 csak utolsó elemként használható a --block-list kapcsolónál"
#: src/xz/args.c:406
#, c-format
msgid "%s: Unknown file format type"
msgstr "%s: Ismeretlen fájlformátumtípus"
#: src/xz/args.c:429 src/xz/args.c:437
#, c-format
msgid "%s: Unsupported integrity check type"
msgstr "%s: Nem támogatott integritás-ellenőrzési típus"
#: src/xz/args.c:473
msgid "Only one file can be specified with `--files' or `--files0'."
msgstr "Csak egy fájl adható meg a „--files” vagy „--files0” kapcsolóknál."
#: src/xz/args.c:541
#, c-format
msgid "The environment variable %s contains too many arguments"
msgstr "A(z) %s környezeti változó túl sok argumentumot tartalmaz"
#: src/xz/args.c:643
msgid "Compression support was disabled at build time"
msgstr "A tömörítési támogatás ki lett kapcsolva fordítási időben"
#: src/xz/args.c:650
msgid "Decompression support was disabled at build time"
msgstr "A kibontási támogatás ki lett kapcsolva fordítási időben"
#: src/xz/coder.c:110
msgid "Maximum number of filters is four"
msgstr "A szűrők legnagyobb száma négy"
#: src/xz/coder.c:129
msgid "Memory usage limit is too low for the given filter setup."
msgstr "A memóriahasználat túl alacsony a megadott szűrőbeállításokhoz."
#: src/xz/coder.c:159
msgid "Using a preset in raw mode is discouraged."
msgstr "Az előbeállítások használata nyers módban nem javasolt."
#: src/xz/coder.c:161
msgid "The exact options of the presets may vary between software versions."
msgstr "Az előbeállítások pontos beállításai különbözhetnek a szoftververziók között."
#: src/xz/coder.c:184
msgid "The .lzma format supports only the LZMA1 filter"
msgstr "Az .lzma formátum csak az LZMA1 szűrőt támogatja"
#: src/xz/coder.c:192
msgid "LZMA1 cannot be used with the .xz format"
msgstr "Az LZMA1 nem használható az .xz formátummal"
#: src/xz/coder.c:209
msgid "The filter chain is incompatible with --flush-timeout"
msgstr "A szűrőlánc nem kompatibilis a --flush-timeout kapcsolóval"
#: src/xz/coder.c:215
msgid "Switching to single-threaded mode due to --flush-timeout"
msgstr "Egyszálú módra váltás a --flush-timeout kapcsoló miatt"
#: src/xz/coder.c:235
#, c-format
msgid "Using up to %<PRIu32> threads."
msgstr "Legfeljebb %<PRIu32> szál használata."
#: src/xz/coder.c:251
msgid "Unsupported filter chain or filter options"
msgstr "Nem támogatott szűrőlánc vagy szűrőkapcsolók"
#: src/xz/coder.c:263
#, c-format
msgid "Decompression will need %s MiB of memory."
msgstr "A kibontáshoz %s MiB memória szükséges."
#: src/xz/coder.c:300
#, c-format
msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
msgstr "A szálak számának módosítása erről: %s, erre: %s, hogy ne lépje túl a(z) %s MiB-os korlátot"
#: src/xz/coder.c:354
#, c-format
msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
msgstr "Az LZMA%c szótár méretének módosítása erről: %s MiB, erre: %s MiB, hogy ne lépje túl a(z) %s MiB-os korlátot"
#: src/xz/file_io.c:110 src/xz/file_io.c:118
#, c-format
msgid "Error creating a pipe: %s"
msgstr "Hiba a csővezeték létrehozásakor: %s"
#: src/xz/file_io.c:173
msgid "Sandbox is disabled due to incompatible command line arguments"
msgstr "A homokozó ki lett kapcsolva a nem kompatibilis parancssori argumentumok miatt"
#: src/xz/file_io.c:216
msgid "Sandbox was successfully enabled"
msgstr "A homokozó sikeresen engedélyezve"
#: src/xz/file_io.c:220
msgid "Failed to enable the sandbox"
msgstr "A homokozó engedélyezése sikertelen"
#: src/xz/file_io.c:262
#, c-format
msgid "%s: poll() failed: %s"
msgstr "%s: poll() sikertelen: %s"
#. TRANSLATORS: When compression or decompression finishes,
#. and xz is going to remove the source file, xz first checks
#. if the source file still exists, and if it does, does its
#. device and inode numbers match what xz saw when it opened
#. the source file. If these checks fail, this message is
#. shown, %s being the filename, and the file is not deleted.
#. The check for device and inode numbers is there, because
#. it is possible that the user has put a new file in place
#. of the original file, and in that case it obviously
#. shouldn't be removed.
#: src/xz/file_io.c:332
#, c-format
msgid "%s: File seems to have been moved, not removing"
msgstr "%s: Úgy tűnik, hogy a fájl át lett helyezve, nincs eltávolítás"
#: src/xz/file_io.c:339 src/xz/file_io.c:878
#, c-format
msgid "%s: Cannot remove: %s"
msgstr "%s: Nem távolítható el: %s"
#: src/xz/file_io.c:364
#, c-format
msgid "%s: Cannot set the file owner: %s"
msgstr "%s: A fájl tulajdonosa nem adható meg: %s"
#: src/xz/file_io.c:370
#, c-format
msgid "%s: Cannot set the file group: %s"
msgstr "%s: A fájl csoportja nem adható meg: %s"
#: src/xz/file_io.c:389
#, c-format
msgid "%s: Cannot set the file permissions: %s"
msgstr "%s: A fájl jogosultságai nem adhatók meg: %s"
#: src/xz/file_io.c:515
#, c-format
msgid "Error getting the file status flags from standard input: %s"
msgstr "Hiba a fájl állapotjelzőinek lekérdezésekor a szabványos bemenetről: %s"
#: src/xz/file_io.c:572 src/xz/file_io.c:634
#, c-format
msgid "%s: Is a symbolic link, skipping"
msgstr "%s: Szimbolikus link, kihagyás"
#: src/xz/file_io.c:663
#, c-format
msgid "%s: Is a directory, skipping"
msgstr "%s: Könyvtár, kihagyás"
#: src/xz/file_io.c:669
#, c-format
msgid "%s: Not a regular file, skipping"
msgstr "%s: Nem szabályos fájl, kihagyás"
#: src/xz/file_io.c:686
#, c-format
msgid "%s: File has setuid or setgid bit set, skipping"
msgstr "%s: A fájlon setuid vagy setgid bit van beállítva, kihagyás"
#: src/xz/file_io.c:693
#, c-format
msgid "%s: File has sticky bit set, skipping"
msgstr "%s: A fájlon sticky bit van beállítva, kihagyás"
#: src/xz/file_io.c:700
#, c-format
msgid "%s: Input file has more than one hard link, skipping"
msgstr "%s: A bemeneti fájlhoz több mint egy hard link tartozik, kihagyás"
#: src/xz/file_io.c:788
#, c-format
msgid "Error restoring the status flags to standard input: %s"
msgstr "Hiba a fájl állapotjelzőinek visszaállításakor a szabványos bemenetre: %s"
#: src/xz/file_io.c:836
#, c-format
msgid "Error getting the file status flags from standard output: %s"
msgstr "Hiba a fájl állapotjelzőinek lekérdezésekor a szabványos kimenetről: %s"
#: src/xz/file_io.c:1014
#, c-format
msgid "Error restoring the O_APPEND flag to standard output: %s"
msgstr "Hiba az O_APPEND visszaállításakor a szabványos kimenetre: %s"
#: src/xz/file_io.c:1026
#, c-format
msgid "%s: Closing the file failed: %s"
msgstr "%s: A fájl lezárása sikertelen: %s"
#: src/xz/file_io.c:1062 src/xz/file_io.c:1288
#, c-format
msgid "%s: Seeking failed when trying to create a sparse file: %s"
msgstr "%s: A pozícionálás sikertelen a ritka fájl létrehozásának kísérletekor: %s"
#: src/xz/file_io.c:1157
#, c-format
msgid "%s: Read error: %s"
msgstr "%s: Olvasási hiba: %s"
#: src/xz/file_io.c:1177
#, c-format
msgid "%s: Error seeking the file: %s"
msgstr "%s: Hiba a fájlban pozícionáláskor: %s"
#: src/xz/file_io.c:1187
#, c-format
msgid "%s: Unexpected end of file"
msgstr "%s: Váratlan fájlvég"
#: src/xz/file_io.c:1246
#, c-format
msgid "%s: Write error: %s"
msgstr "%s: Írási hiba: %s"
#: src/xz/hardware.c:107
msgid "Disabled"
msgstr "Letiltva"
#. TRANSLATORS: Test with "xz --info-memory" to see if
#. the alignment looks nice.
#: src/xz/hardware.c:126
msgid "Total amount of physical memory (RAM): "
msgstr "Az összes fizikai memória (RAM): "
#: src/xz/hardware.c:128
msgid "Memory usage limit for compression: "
msgstr "Memóriahasználat korlátja tömörítéskor: "
#: src/xz/hardware.c:130
msgid "Memory usage limit for decompression: "
msgstr "Memóriahasználat korlátja kibontáskor: "
#. TRANSLATORS: Indicates that there is no integrity check.
#. This string is used in tables, so the width must not
#. exceed ten columns with a fixed-width font.
#: src/xz/list.c:65
msgid "None"
msgstr "Nincs"
#. TRANSLATORS: Indicates that integrity check name is not known,
#. but the Check ID is known (here 2). This and other "Unknown-N"
#. strings are used in tables, so the width must not exceed ten
#. columns with a fixed-width font. It's OK to omit the dash if
#. you need space for one extra letter, but don't use spaces.
#: src/xz/list.c:72
msgid "Unknown-2"
msgstr "Névtelen-2"
#: src/xz/list.c:73
msgid "Unknown-3"
msgstr "Névtelen-3"
#: src/xz/list.c:75
msgid "Unknown-5"
msgstr "Névtelen-5"
#: src/xz/list.c:76
msgid "Unknown-6"
msgstr "Névtelen-6"
#: src/xz/list.c:77
msgid "Unknown-7"
msgstr "Névtelen-7"
#: src/xz/list.c:78
msgid "Unknown-8"
msgstr "Névtelen-8"
#: src/xz/list.c:79
msgid "Unknown-9"
msgstr "Névtelen-9"
#: src/xz/list.c:81
msgid "Unknown-11"
msgstr "Névtelen-11"
#: src/xz/list.c:82
msgid "Unknown-12"
msgstr "Névtelen-12"
#: src/xz/list.c:83
msgid "Unknown-13"
msgstr "Névtelen-13"
#: src/xz/list.c:84
msgid "Unknown-14"
msgstr "Névtelen-14"
#: src/xz/list.c:85
msgid "Unknown-15"
msgstr "Névtelen-15"
#: src/xz/list.c:153
#, c-format
msgid "%s: File is empty"
msgstr "%s: A fájl üres"
#: src/xz/list.c:158
#, c-format
msgid "%s: Too small to be a valid .xz file"
msgstr "%s: Túl kicsi, hogy érvényes .xz fájl legyen"
#. TRANSLATORS: These are column headings. From Strms (Streams)
#. to Ratio, the columns are right aligned. Check and Filename
#. are left aligned. If you need longer words, it's OK to
#. use two lines here. Test with "xz -l foo.xz".
#: src/xz/list.c:677
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
msgstr "Folyam Blokkok Tömörített Kibontott Arány Ellenőrzés Fájlnév"
#: src/xz/list.c:717
#, c-format
msgid " Streams: %s\n"
msgstr " Adatfolyamok: %s\n"
#: src/xz/list.c:719
#, c-format
msgid " Blocks: %s\n"
msgstr " Blokkok: %s\n"
#: src/xz/list.c:721
#, c-format
msgid " Compressed size: %s\n"
msgstr " Tömörített méret: %s\n"
#: src/xz/list.c:724
#, c-format
msgid " Uncompressed size: %s\n"
msgstr " Kibontott méret: %s\n"
#: src/xz/list.c:727
#, c-format
msgid " Ratio: %s\n"
msgstr " Arány: %s\n"
#: src/xz/list.c:729
#, c-format
msgid " Check: %s\n"
msgstr " Ellenőrzés: %s\n"
#: src/xz/list.c:730
#, c-format
msgid " Stream padding: %s\n"
msgstr " Adatfolyam kerete: %s\n"
#. TRANSLATORS: The second line is column headings. All except
#. Check are right aligned; Check is left aligned. Test with
#. "xz -lv foo.xz".
#: src/xz/list.c:758
msgid ""
" Streams:\n"
" Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
msgstr ""
" Adatfolyamok:\n"
" Folyam Blokkok TömEltolás KibEltolás TömMéret KibMéret Arány Ellenőrzés Keret"
#. TRANSLATORS: The second line is column headings. All
#. except Check are right aligned; Check is left aligned.
#: src/xz/list.c:813
#, c-format
msgid ""
" Blocks:\n"
" Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
msgstr ""
" Blokkok:\n"
" Folyam Blokkok TömEltolás KibEltolás TömMéret KibMéret Arány Ellenőrzés"
#. TRANSLATORS: These are additional column headings
#. for the most verbose listing mode. CheckVal
#. (Check value), Flags, and Filters are left aligned.
#. Header (Block Header Size), CompSize, and MemUsage
#. are right aligned. %*s is replaced with 0-120
#. spaces to make the CheckVal column wide enough.
#. Test with "xz -lvv foo.xz".
#: src/xz/list.c:825
#, c-format
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
msgstr " ÉrtékEll %*s Fejléc Jelzők TömMéret MemHasználat Szűrők"
#: src/xz/list.c:903 src/xz/list.c:1078
#, c-format
msgid " Memory needed: %s MiB\n"
msgstr " Szükséges memória: %s MiB\n"
#: src/xz/list.c:905 src/xz/list.c:1080
#, c-format
msgid " Sizes in headers: %s\n"
msgstr " Méretek a fejlécekben: %s\n"
#: src/xz/list.c:906 src/xz/list.c:1081
msgid "Yes"
msgstr "Igen"
#: src/xz/list.c:906 src/xz/list.c:1081
msgid "No"
msgstr "Nem"
#: src/xz/list.c:907 src/xz/list.c:1082
#, c-format
msgid " Minimum XZ Utils version: %s\n"
msgstr " Legkisebb XZ Utils verzió: %s\n"
#. TRANSLATORS: %s is an integer. Only the plural form of this
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
#: src/xz/list.c:1057
#, c-format
msgid "%s file\n"
msgid_plural "%s files\n"
msgstr[0] "%s fájl\n"
msgstr[1] "%s fájl\n"
#: src/xz/list.c:1070
msgid "Totals:"
msgstr "Összesen:"
#: src/xz/list.c:1071
#, c-format
msgid " Number of files: %s\n"
msgstr " Fájlok száma: %s\n"
#: src/xz/list.c:1146
msgid "--list works only on .xz files (--format=xz or --format=auto)"
msgstr "A --list csak .xz fájlokkal működik (--format=xz vagy --format=auto)"
#: src/xz/list.c:1152
msgid "--list does not support reading from standard input"
msgstr "A --list nem támogatja a szabványos bemenetről beolvasást"
#: src/xz/main.c:89
#, c-format
msgid "%s: Error reading filenames: %s"
msgstr "%s: Hiba a fájlnevek olvasásakor: %s"
#: src/xz/main.c:96
#, c-format
msgid "%s: Unexpected end of input when reading filenames"
msgstr "%s: A bemenet váratlanul véget ért a fájlnevek olvasásakor"
#: src/xz/main.c:120
#, c-format
msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
msgstr "%s: Null karakter található a fájlnevek olvasásakor; talán a „--files0” kapcsolóra gondolt a „--files” helyett?"
#: src/xz/main.c:174
msgid "Compression and decompression with --robot are not supported yet."
msgstr "A tömörítés és kibontás még nem támogatott a --robot kapcsolóval."
#: src/xz/main.c:252
msgid "Cannot read data from standard input when reading filenames from standard input"
msgstr "Az adatok nem olvashatók be a szabványos bemenetről a fájlnevek olvasásakor"
#. TRANSLATORS: This is the program name in the beginning
#. of the line in messages. Usually it becomes "xz: ".
#. This is a translatable string because French needs
#. a space before a colon.
#: src/xz/message.c:714
#, c-format
msgid "%s: "
msgstr "%s: "
#: src/xz/message.c:777 src/xz/message.c:827
msgid "Internal error (bug)"
msgstr "Belső hiba (bug)"
#: src/xz/message.c:784
msgid "Cannot establish signal handlers"
msgstr "A szignálkezelők nem hozhatók létre"
#: src/xz/message.c:793
msgid "No integrity check; not verifying file integrity"
msgstr "Nincs integritás-ellenőrzés; a fájl épsége nem lesz ellenőrizve"
#: src/xz/message.c:796
msgid "Unsupported type of integrity check; not verifying file integrity"
msgstr "Nem támogatott integritás-ellenőrzési típus; a fájl épsége nem lesz ellenőrizve"
#: src/xz/message.c:803
msgid "Memory usage limit reached"
msgstr "Memóriahasználat korlátja elérve"
#: src/xz/message.c:806
msgid "File format not recognized"
msgstr "A fájlformátum nem felismert"
#: src/xz/message.c:809
msgid "Unsupported options"
msgstr "Nem támogatott kapcsolók"
#: src/xz/message.c:812
msgid "Compressed data is corrupt"
msgstr "A tömörített adatok megsérültek"
#: src/xz/message.c:815
msgid "Unexpected end of input"
msgstr "A bemenet váratlanul véget ért"
#: src/xz/message.c:848
#, c-format
msgid "%s MiB of memory is required. The limiter is disabled."
msgstr "%s MiB memória szükséges. A korlátozás letiltva."
#: src/xz/message.c:876
#, c-format
msgid "%s MiB of memory is required. The limit is %s."
msgstr "%s MiB memória szükséges. A korlát %s."
#: src/xz/message.c:1043
#, c-format
msgid "%s: Filter chain: %s\n"
msgstr "%s: Szűrőlánc: %s\n"
#: src/xz/message.c:1053
#, c-format
msgid "Try `%s --help' for more information."
msgstr "További információkért adja ki a következő parancsot: „%s --help”."
#: src/xz/message.c:1079
#, c-format
msgid ""
"Usage: %s [OPTION]... [FILE]...\n"
"Compress or decompress FILEs in the .xz format.\n"
"\n"
msgstr ""
"Használat: %s [KAPCSOLÓ]... [FÁJL]...\n"
".xz formátumú FÁJLok tömörítése vagy kibontása.\n"
"\n"
#: src/xz/message.c:1086
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
msgstr "A hosszú kapcsolók kötelező argumentumai a rövid kapcsolók esetén is kötelezők.\n"
#: src/xz/message.c:1090
msgid " Operation mode:\n"
msgstr " Működési mód:\n"
#: src/xz/message.c:1093
msgid ""
" -z, --compress force compression\n"
" -d, --decompress force decompression\n"
" -t, --test test compressed file integrity\n"
" -l, --list list information about .xz files"
msgstr ""
" -z, --compress kényszerített tömörítés\n"
" -d, --decompress kényszerített kibontás\n"
" -t, --test tömörített fájl épségének tesztelése\n"
" -l, --list információk kiírása az .xz fájlokról"
#: src/xz/message.c:1099
msgid ""
"\n"
" Operation modifiers:\n"
msgstr ""
"\n"
" Műveleti módosítók:\n"
#: src/xz/message.c:1102
msgid ""
" -k, --keep keep (don't delete) input files\n"
" -f, --force force overwrite of output file and (de)compress links\n"
" -c, --stdout write to standard output and don't delete input files"
msgstr ""
" -k, --keep bemeneti fájlok megtartása (ne törölje)\n"
" -f, --force kimeneti fájl kényszerített felülírása,\n"
" és a linkek tömörítése/kibontása\n"
" -c, --stdout írás a szabványos kimenetre írás, és nem törli a\n"
" bemeneti fájlokat"
#: src/xz/message.c:1108
msgid ""
" --single-stream decompress only the first stream, and silently\n"
" ignore possible remaining input data"
msgstr ""
" --single-stream csak az első adatfolyam kibontása, és a\n"
" lehetséges hátralévő bemeneti adatok mellőzése"
#: src/xz/message.c:1111
msgid ""
" --no-sparse do not create sparse files when decompressing\n"
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
" --files[=FILE] read filenames to process from FILE; if FILE is\n"
" omitted, filenames are read from the standard input;\n"
" filenames must be terminated with the newline character\n"
" --files0[=FILE] like --files but use the null character as terminator"
msgstr ""
" --no-sparse ne hozzon létre ritka fájlokat kibontáskor\n"
" -S, --suffix=.SUF a „.SUF” utótag használata a tömörített fájlokon\n"
" --files[=FÁJL] fájlnevek beolvasása a FÁJLból; ha a FÁJL nincs megadva,\n"
" akkor a fájlnevek a szabványos bemenetről lesznek\n"
" beolvasva; a fájlneveket újsor karakterrel kell zárni\n"
" --files0[=FÁJL] mint a --files, de a null karakter használata\n"
" elválasztóként"
#: src/xz/message.c:1120
msgid ""
"\n"
" Basic file format and compression options:\n"
msgstr ""
"\n"
" Alapvető fájlformátum és tömörítési beállítások:\n"
#: src/xz/message.c:1122
msgid ""
" -F, --format=FMT file format to encode or decode; possible values are\n"
" `auto' (default), `xz', `lzma', and `raw'\n"
" -C, --check=CHECK integrity check type: `none' (use with caution),\n"
" `crc32', `crc64' (default), or `sha256'"
msgstr ""
" -F, --format=FMT a kódoláshoz vagy dekódoláshoz használt fájlformátum;\n"
" lehetséges értékek „auto” (alapértelmezett), „xz”,\n"
" „lzma” és „raw”\n"
" -C, --check=ELL integritás-ellenőrzés típusa: „none” (óvatosan használja),\n"
" „crc32”, „crc64” (alapértelmezett) vagy „sha256”"
#: src/xz/message.c:1127
msgid " --ignore-check don't verify the integrity check when decompressing"
msgstr " --ignore-check kibontáskor ne ellenőrizze az épséget"
#: src/xz/message.c:1131
msgid ""
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
" decompressor memory usage into account before using 7-9!"
msgstr ""
" -0 ... -9 tömörítési előbeállítás; alapértelmezett a 6;\n"
" a 7-9 használata előtt vegye figyelembe a tömörítő\n"
" *és* kibontó memóriahasználatát!"
#: src/xz/message.c:1135
msgid ""
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
" does not affect decompressor memory requirements"
msgstr ""
" -e, --extreme a tömörítési arány javítási kísérlete több CPU-idő\n"
" használatával; nincs hatással a kibontó memóriaigényére"
#: src/xz/message.c:1139
msgid ""
" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
" to use as many threads as there are processor cores"
msgstr ""
" -T, --threads=SZÁM legfeljebb ennyi szál használata; alapértelmezett az 1;\n"
" állítsa 0-ra, hogy annyi szálat használjon, amennyi\n"
" processzormag áll rendelkezésre"
#: src/xz/message.c:1144
msgid ""
" --block-size=SIZE\n"
" start a new .xz block after every SIZE bytes of input;\n"
" use this to set the block size for threaded compression"
msgstr ""
" --block-size=MÉRET\n"
" új .xz blokk indítása minden MÉRETnyi bájt bemenet után;\n"
" a többszálas tömörítés blokkméretének megadásához"
#: src/xz/message.c:1148
msgid ""
" --block-list=SIZES\n"
" start a new .xz block after the given comma-separated\n"
" intervals of uncompressed data"
msgstr ""
" --block-list=MÉRETEK\n"
" új .xz blokk indítása a vesszőkkel felsorolva megadott\n"
" méretű tömörítetlen adatszakaszok után"
#: src/xz/message.c:1152
msgid ""
" --flush-timeout=TIMEOUT\n"
" when compressing, if more than TIMEOUT milliseconds has\n"
" passed since the previous flush and reading more input\n"
" would block, all pending data is flushed out"
msgstr ""
" --flush-timeout=IDŐTÚLLÉPÉS\n"
" tömörítéskor, ha több mint IDŐTÚLLÉPÉS ezredmásodperc\n"
" telt el az előző kiírástól, és a bemenetolvasás\n"
" blokkolna, akkor minden adat ki lesz írva"
#: src/xz/message.c:1158
#, no-c-format
msgid ""
" --memlimit-compress=LIMIT\n"
" --memlimit-decompress=LIMIT\n"
" -M, --memlimit=LIMIT\n"
" set memory usage limit for compression, decompression,\n"
" or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
msgstr ""
" --memlimit-compress=KORLÁT\n"
" --memlimit-decompress=KORLÁT\n"
" -M, --memlimit=KORLÁT\n"
" a memóriahasználati korlát megadása tömörítéshez,\n"
" kibontáshoz vagy mindkettőhöz; a KORLÁT bájtokban van\n"
" megadva, a RAM %-ában, vagy 0 az alapértelmezéshez"
#: src/xz/message.c:1165
msgid ""
" --no-adjust if compression settings exceed the memory usage limit,\n"
" give an error instead of adjusting the settings downwards"
msgstr ""
" --no-adjust ha a tömörítési beállítások túllépik a memóriahasználati\n"
" korlátot, akkor hibát fog adni a beállítások lefelé\n"
" állítása helyett"
#: src/xz/message.c:1171
msgid ""
"\n"
" Custom filter chain for compression (alternative for using presets):"
msgstr ""
"\n"
" Egyéni szűrőlánc a tömörítéshez (alternatíva az előbeállításokra):"
#: src/xz/message.c:1180
msgid ""
"\n"
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
" --lzma2[=OPTS] more of the following options (valid values; default):\n"
" preset=PRE reset options to a preset (0-9[e])\n"
" dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n"
" lc=NUM number of literal context bits (0-4; 3)\n"
" lp=NUM number of literal position bits (0-4; 0)\n"
" pb=NUM number of position bits (0-4; 2)\n"
" mode=MODE compression mode (fast, normal; normal)\n"
" nice=NUM nice length of a match (2-273; 64)\n"
" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n"
" depth=NUM maximum search depth; 0=automatic (default)"
msgstr ""
"\n"
" --lzma1[=KAPCS] LZMA1 vagy LZMA2; a KAPCS nulla vagy több vesszővel\n"
" --lzma2[=KAPCS] elválasztott kapcsoló az alábbiak közül\n"
" (érvényes érték; alapértelmezett):\n"
" preset=ELŐ visszaállítás egy előbeállításra (0-9[e])\n"
" dict=SZÁM szótárméret (4KiB - 1536MiB; 8MiB)\n"
" lc=SZÁM literál környezeti bitek száma (0-4; 3)\n"
" lp=SZÁM literál pozícióbitek száma (0-4; 0)\n"
" pb=SZÁM pozícióbitek száma (0-4; 2)\n"
" mode=MÓD tömörítési mód (fast, normal; normal)\n"
" nice=SZÁM az egyezés „nice” hossza (2-273; 64)\n"
" mf=NÉV egyezéskereső (hc3, hc4, bt2, bt3, bt4; bt4)\n"
" depth=SZÁM legnagyobb keresési mélység; 0=automatikus\n"
" (alapértelmezett)"
#: src/xz/message.c:1195
msgid ""
"\n"
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
" --arm[=OPTS] ARM BCJ filter (little endian only)\n"
" --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
" --sparc[=OPTS] SPARC BCJ filter\n"
" Valid OPTS for all BCJ filters:\n"
" start=NUM start offset for conversions (default=0)"
msgstr ""
"\n"
" --x86[=KAPCS] x86 BCJ szűrő (32 bites és 64 bites)\n"
" --powerpc[=KAPCS] PowerPC BCJ szűrő (csak big endian esetén)\n"
" --ia64[=KAPCS] IA-64 (Itanium) BCJ szűrő\n"
" --arm[=KAPCS] ARM BCJ szűrő (csak little endian esetén)\n"
" --armthumb[=KAPCS] ARM-Thumb BCJ szűrő (csak little endian esetén)\n"
" --sparc[=KAPCS] SPARC BCJ szűrő\n"
" Érvényes KAPCS az összes BCJ szűrőhöz:\n"
" start=SZÁM kezdési eltolás az átalakításokhoz\n"
" (alapértelmezett=0)"
#: src/xz/message.c:1207
msgid ""
"\n"
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
" dist=NUM distance between bytes being subtracted\n"
" from each other (1-256; 1)"
msgstr ""
"\n"
" --delta[=OPTS] Delta szűrő; érvényes KAPCSOLÓK\n"
" (érvényes értékek; alapértelmezett default):\n"
" dist=SZÁM az egymásból kivont bájtok közti\n"
" távolság (1-256; 1)"
#: src/xz/message.c:1215
msgid ""
"\n"
" Other options:\n"
msgstr ""
"\n"
" Egyéb kapcsolók:\n"
#: src/xz/message.c:1218
msgid ""
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
" -v, --verbose be verbose; specify twice for even more verbose"
msgstr ""
" -q, --quiet figyelmeztetések elrejtése; adja meg kétszer, hogy a\n"
" hibákat is elrejtse\n"
" -v, --verbose legyen bőbeszédű; adja meg kétszer, hogy még bőbeszédűbb\n"
" legyen"
#: src/xz/message.c:1223
msgid " -Q, --no-warn make warnings not affect the exit status"
msgstr ""
" -Q, --no-warn a figyelmeztetések nem befolyásolják a kilépési\n"
" állapotkódot"
#: src/xz/message.c:1225
msgid " --robot use machine-parsable messages (useful for scripts)"
msgstr ""
" --robot géppel értelmezhető üzenetek használata\n"
" (parancsfájlok esetén hasznos)"
#: src/xz/message.c:1228
msgid ""
" --info-memory display the total amount of RAM and the currently active\n"
" memory usage limits, and exit"
msgstr ""
" --info-memory az összes RAM mennyiségének és a jelenlegi\n"
" memóriahasználati korlátok megjelenítése, és kilépés"
#: src/xz/message.c:1231
msgid ""
" -h, --help display the short help (lists only the basic options)\n"
" -H, --long-help display this long help and exit"
msgstr ""
" -h, --help a rövid súgó megjelenítése (csak az alapvető kapcsolók)\n"
" -H, --long-help ezen hosszú súgó megjelenítése, és kilépés"
#: src/xz/message.c:1235
msgid ""
" -h, --help display this short help and exit\n"
" -H, --long-help display the long help (lists also the advanced options)"
msgstr ""
" -h, --help ezen rövid súgó megjelenítése, és kilépés\n"
" -H, --long-help a hosszú súgó megjelenítése (speciális kapcsolókhoz)"
#: src/xz/message.c:1240
msgid " -V, --version display the version number and exit"
msgstr " -V, --version a verziószám kiírása és kilépés"
#: src/xz/message.c:1242
msgid ""
"\n"
"With no FILE, or when FILE is -, read standard input.\n"
msgstr ""
"\n"
"FÁJL nélkül, vagy ha a FÁJL -, olvasás a szabványos bemenetről.\n"
#. TRANSLATORS: This message indicates the bug reporting address
#. for this package. Please add _another line_ saying
#. "Report translation bugs to <...>\n" with the email or WWW
#. address for translation bugs. Thanks.
#: src/xz/message.c:1248
#, c-format
msgid "Report bugs to <%s> (in English or Finnish).\n"
msgstr "Ide jelentse a hibákat: <%s> (angolul vagy finnül).\n"
#: src/xz/message.c:1250
#, c-format
msgid "%s home page: <%s>\n"
msgstr "%s honlap: <%s>\n"
#: src/xz/message.c:1254
msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
msgstr "EZ EGY FEJLESZTŐI VÁLTOZAT, NEM ÉLES HASZNÁLATRA SZÁNT."
#: src/xz/options.c:86
#, c-format
msgid "%s: Options must be `name=value' pairs separated with commas"
msgstr "%s: A kapcsolóknak vesszőkkel elválasztott „név=érték” pároknak kell lenniük"
#: src/xz/options.c:93
#, c-format
msgid "%s: Invalid option name"
msgstr "%s: Érvénytelen kapcsolónév"
#: src/xz/options.c:113
#, c-format
msgid "%s: Invalid option value"
msgstr "%s: Érvénytelen kapcsolóérték"
#: src/xz/options.c:247
#, c-format
msgid "Unsupported LZMA1/LZMA2 preset: %s"
msgstr "Nem támogatott LZMA1/LZMA2 előbeállítás: %s"
#: src/xz/options.c:355
msgid "The sum of lc and lp must not exceed 4"
msgstr "Az lc és lp összege nem haladhatja meg a 4-et"
#: src/xz/options.c:359
#, c-format
msgid "The selected match finder requires at least nice=%<PRIu32>"
msgstr "A kiválasztott egyezéskeresőhöz legalább nice=%<PRIu32> szükséges"
#: src/xz/suffix.c:133 src/xz/suffix.c:258
#, c-format
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
msgstr "%s: --format=raw esetén, --suffix=.SUF szükséges, hacsak nem a szabványosra kimenetre ír"
#: src/xz/suffix.c:164
#, c-format
msgid "%s: Filename has an unknown suffix, skipping"
msgstr "%s: A fájlnév utótagja ismeretlen, kihagyás"
#: src/xz/suffix.c:185
#, c-format
msgid "%s: File already has `%s' suffix, skipping"
msgstr "%s: A(z) „%s” fájlnak már van utótagja, kihagyás"
#: src/xz/suffix.c:393
#, c-format
msgid "%s: Invalid filename suffix"
msgstr "%s: Érvénytelen fájlnév utótag"
#: src/xz/util.c:71
#, c-format
msgid "%s: Value is not a non-negative decimal integer"
msgstr "%s: Az érték nem nemnegatív decimális egész szám"
#: src/xz/util.c:113
#, c-format
msgid "%s: Invalid multiplier suffix"
msgstr "%s: Érvénytelen szorzó utótag"
#: src/xz/util.c:115
msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
msgstr "Az érvényes utótagok: „KiB” (2^10), „MiB” (2^20) és „GiB” (2^30)."
#: src/xz/util.c:132
#, c-format
msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
msgstr "A(z) „%s” kapcsoló értékének a(z) [%<PRIu64>, %<PRIu64>] tartományban kell lennie"
#: src/xz/util.c:257
msgid "Empty filename, skipping"
msgstr "Üres fájlnév, kihagyás"
#: src/xz/util.c:271
msgid "Compressed data cannot be read from a terminal"
msgstr "A tömörített adatokat nem lehet beolvasni a terminálból"
#: src/xz/util.c:284
msgid "Compressed data cannot be written to a terminal"
msgstr "A tömörített adatokat nem lehet kiírni a terminálba"
#: src/common/tuklib_exit.c:39
msgid "Writing to standard output failed"
msgstr "A szabványos kimenetre írás sikertelen"
#: src/common/tuklib_exit.c:42
msgid "Unknown error"
msgstr "Ismeretlen hiba"

479
po/it.po

File diff suppressed because it is too large Load Diff

239
po/pl.po
View File

@ -1,16 +1,17 @@
# Polish translation for xz. # Polish translation for xz.
# This file is in the public domain. # This file is put in the public domain.
# Jakub Bogusz <qboosh@pld-linux.org>, 2011-2014. # Jakub Bogusz <qboosh@pld-linux.org>, 2011-2019.
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: xz 5.1.4\n" "Project-Id-Version: xz 5.2.4\n"
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n" "Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
"POT-Creation-Date: 2014-09-14 21:56+0300\n" "POT-Creation-Date: 2018-04-29 18:19+0300\n"
"PO-Revision-Date: 2014-10-15 20:53+0200\n" "PO-Revision-Date: 2019-03-05 05:30+0100\n"
"Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n" "Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n"
"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n" "Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
"Language: pl\n" "Language: pl\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
@ -49,6 +50,14 @@ msgstr "Wraz z opcją `--files' lub `--files0' można podać tylko jeden plik."
msgid "The environment variable %s contains too many arguments" msgid "The environment variable %s contains too many arguments"
msgstr "Zmienna środowiskowa %s zawiera zbyt dużo argumentów" msgstr "Zmienna środowiskowa %s zawiera zbyt dużo argumentów"
#: src/xz/args.c:643
msgid "Compression support was disabled at build time"
msgstr "Obsługa kompresji została wyłączona na etapie budowania"
#: src/xz/args.c:650
msgid "Decompression support was disabled at build time"
msgstr "Obsługa dekompresji została wyłączona na etapie budowania"
#: src/xz/coder.c:110 #: src/xz/coder.c:110
msgid "Maximum number of filters is four" msgid "Maximum number of filters is four"
msgstr "Maksymalna liczba filtrów to cztery" msgstr "Maksymalna liczba filtrów to cztery"
@ -81,36 +90,48 @@ msgstr "Łańcuch filtrów jest niezgodny z --flush-timeout"
msgid "Switching to single-threaded mode due to --flush-timeout" msgid "Switching to single-threaded mode due to --flush-timeout"
msgstr "Przełączanie w tryb jednowątkowy z powodu --flush-timeout" msgstr "Przełączanie w tryb jednowątkowy z powodu --flush-timeout"
#: src/xz/coder.c:234 #: src/xz/coder.c:235
#, c-format #, c-format
msgid "Using up to %<PRIu32> threads." msgid "Using up to %<PRIu32> threads."
msgstr "Maksymalna liczba używanych wątków: %<PRIu32>." msgstr "Maksymalna liczba używanych wątków: %<PRIu32>."
#: src/xz/coder.c:247 #: src/xz/coder.c:251
msgid "Unsupported filter chain or filter options" msgid "Unsupported filter chain or filter options"
msgstr "Nieobsługiwany łańcuch filtrów lub opcje filtra" msgstr "Nieobsługiwany łańcuch filtrów lub opcje filtra"
#: src/xz/coder.c:255 #: src/xz/coder.c:263
#, c-format #, c-format
msgid "Decompression will need %s MiB of memory." msgid "Decompression will need %s MiB of memory."
msgstr "Dekompresja będzie wymagała %s MiB pamięci." msgstr "Dekompresja będzie wymagała %s MiB pamięci."
#: src/xz/coder.c:290 #: src/xz/coder.c:300
#, c-format #, c-format
msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB" msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
msgstr "Skorygowano liczbę wątków z %s do %s, aby nie przekroczyć limitu użycia pamięci %s MiB" msgstr "Skorygowano liczbę wątków z %s do %s, aby nie przekroczyć limitu użycia pamięci %s MiB"
#: src/xz/coder.c:344 #: src/xz/coder.c:354
#, c-format #, c-format
msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB" msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
msgstr "Skorygowano rozmiar słownika LZMA%c z %s MiB do %s MiB aby nie przekroczyć limitu użycia pamięci %s MiB" msgstr "Skorygowano rozmiar słownika LZMA%c z %s MiB do %s MiB aby nie przekroczyć limitu użycia pamięci %s MiB"
#: src/xz/file_io.c:90 #: src/xz/file_io.c:110 src/xz/file_io.c:118
#, c-format #, c-format
msgid "Error creating a pipe: %s" msgid "Error creating a pipe: %s"
msgstr "Błąd tworzenia potoku: %s" msgstr "Błąd tworzenia potoku: %s"
#: src/xz/file_io.c:166 #: src/xz/file_io.c:173
msgid "Sandbox is disabled due to incompatible command line arguments"
msgstr "Piaskownica jest wyłączona ze względu na niezgodne opcje linii poleceń"
#: src/xz/file_io.c:216
msgid "Sandbox was successfully enabled"
msgstr "Piaskownica została włączona"
#: src/xz/file_io.c:220
msgid "Failed to enable the sandbox"
msgstr "Nie udało się włączyć piaskownicy"
#: src/xz/file_io.c:262
#, c-format #, c-format
msgid "%s: poll() failed: %s" msgid "%s: poll() failed: %s"
msgstr "%s: poll() nie powiodło się: %s" msgstr "%s: poll() nie powiodło się: %s"
@ -125,117 +146,107 @@ msgstr "%s: poll() nie powiodło się: %s"
#. it is possible that the user has put a new file in place #. it is possible that the user has put a new file in place
#. of the original file, and in that case it obviously #. of the original file, and in that case it obviously
#. shouldn't be removed. #. shouldn't be removed.
#: src/xz/file_io.c:236 #: src/xz/file_io.c:332
#, c-format #, c-format
msgid "%s: File seems to have been moved, not removing" msgid "%s: File seems to have been moved, not removing"
msgstr "%s: Plik wygląda na przeniesiony, nie zostanie usunięty" msgstr "%s: Plik wygląda na przeniesiony, nie zostanie usunięty"
#: src/xz/file_io.c:243 src/xz/file_io.c:761 #: src/xz/file_io.c:339 src/xz/file_io.c:878
#, c-format #, c-format
msgid "%s: Cannot remove: %s" msgid "%s: Cannot remove: %s"
msgstr "%s: Nie można usunąć: %s" msgstr "%s: Nie można usunąć: %s"
#: src/xz/file_io.c:268 #: src/xz/file_io.c:364
#, c-format #, c-format
msgid "%s: Cannot set the file owner: %s" msgid "%s: Cannot set the file owner: %s"
msgstr "%s: Nie można ustawić właściciela pliku: %s" msgstr "%s: Nie można ustawić właściciela pliku: %s"
#: src/xz/file_io.c:274 #: src/xz/file_io.c:370
#, c-format #, c-format
msgid "%s: Cannot set the file group: %s" msgid "%s: Cannot set the file group: %s"
msgstr "%s: Nie można ustawić grupy pliku: %s" msgstr "%s: Nie można ustawić grupy pliku: %s"
#: src/xz/file_io.c:293 #: src/xz/file_io.c:389
#, c-format #, c-format
msgid "%s: Cannot set the file permissions: %s" msgid "%s: Cannot set the file permissions: %s"
msgstr "%s: Nie można ustawić uprawnień pliku: %s" msgstr "%s: Nie można ustawić uprawnień pliku: %s"
#: src/xz/file_io.c:399 #: src/xz/file_io.c:515
#, c-format #, c-format
msgid "Error getting the file status flags from standard input: %s" msgid "Error getting the file status flags from standard input: %s"
msgstr "Błąd podczas pobierania flag stanu pliku ze standardowego wejścia: %s" msgstr "Błąd podczas pobierania flag stanu pliku ze standardowego wejścia: %s"
#: src/xz/file_io.c:408 #: src/xz/file_io.c:572 src/xz/file_io.c:634
#, c-format
msgid "Error setting O_NONBLOCK on standard input: %s"
msgstr "Błąd podczas ustawiania O_NONBLOCK dla standardowego wejścia: %s"
#: src/xz/file_io.c:460 src/xz/file_io.c:522
#, c-format #, c-format
msgid "%s: Is a symbolic link, skipping" msgid "%s: Is a symbolic link, skipping"
msgstr "%s: Jest dowiązaniem symbolicznym, pominięto" msgstr "%s: Jest dowiązaniem symbolicznym, pominięto"
#: src/xz/file_io.c:551 #: src/xz/file_io.c:663
#, c-format #, c-format
msgid "%s: Is a directory, skipping" msgid "%s: Is a directory, skipping"
msgstr "%s: Jest katalogiem, pominięto" msgstr "%s: Jest katalogiem, pominięto"
#: src/xz/file_io.c:557 #: src/xz/file_io.c:669
#, c-format #, c-format
msgid "%s: Not a regular file, skipping" msgid "%s: Not a regular file, skipping"
msgstr "%s: Nie jest zwykłym plikiem, pominięto" msgstr "%s: Nie jest zwykłym plikiem, pominięto"
#: src/xz/file_io.c:574 #: src/xz/file_io.c:686
#, c-format #, c-format
msgid "%s: File has setuid or setgid bit set, skipping" msgid "%s: File has setuid or setgid bit set, skipping"
msgstr "%s: Plik ma ustawiony bit setuid lub setgid, pominięto" msgstr "%s: Plik ma ustawiony bit setuid lub setgid, pominięto"
#: src/xz/file_io.c:581 #: src/xz/file_io.c:693
#, c-format #, c-format
msgid "%s: File has sticky bit set, skipping" msgid "%s: File has sticky bit set, skipping"
msgstr "%s: Plik ma ustawiony bit sticky, pominięto" msgstr "%s: Plik ma ustawiony bit sticky, pominięto"
#: src/xz/file_io.c:588 #: src/xz/file_io.c:700
#, c-format #, c-format
msgid "%s: Input file has more than one hard link, skipping" msgid "%s: Input file has more than one hard link, skipping"
msgstr "%s: Plik wejściowy ma więcej niż jedno dowiązanie zwykłe, pominięto" msgstr "%s: Plik wejściowy ma więcej niż jedno dowiązanie zwykłe, pominięto"
#: src/xz/file_io.c:668 #: src/xz/file_io.c:788
#, c-format #, c-format
msgid "Error restoring the status flags to standard input: %s" msgid "Error restoring the status flags to standard input: %s"
msgstr "Błąd podczas odtwarzania flag stanu dla standardowego wejścia: %s" msgstr "Błąd podczas odtwarzania flag stanu dla standardowego wejścia: %s"
#: src/xz/file_io.c:714 #: src/xz/file_io.c:836
#, c-format #, c-format
msgid "Error getting the file status flags from standard output: %s" msgid "Error getting the file status flags from standard output: %s"
msgstr "Błąd podczas pobierania flag stanu pliku ze standardowego wyjścia: %s" msgstr "Błąd podczas pobierania flag stanu pliku ze standardowego wyjścia: %s"
#: src/xz/file_io.c:723 #: src/xz/file_io.c:1014
#, c-format
msgid "Error setting O_NONBLOCK on standard output: %s"
msgstr "Błąd podczas ustawiania O_NONBLOCK dla standardowego wyjścia: %s"
#: src/xz/file_io.c:896
#, c-format #, c-format
msgid "Error restoring the O_APPEND flag to standard output: %s" msgid "Error restoring the O_APPEND flag to standard output: %s"
msgstr "Błąd podczas odtwarzania flagi O_APPEND dla standardowego wyjścia: %s" msgstr "Błąd podczas odtwarzania flagi O_APPEND dla standardowego wyjścia: %s"
#: src/xz/file_io.c:908 #: src/xz/file_io.c:1026
#, c-format #, c-format
msgid "%s: Closing the file failed: %s" msgid "%s: Closing the file failed: %s"
msgstr "%s: Zamknięcie pliku nie powiodło się: %s" msgstr "%s: Zamknięcie pliku nie powiodło się: %s"
#: src/xz/file_io.c:944 src/xz/file_io.c:1170 #: src/xz/file_io.c:1062 src/xz/file_io.c:1288
#, c-format #, c-format
msgid "%s: Seeking failed when trying to create a sparse file: %s" msgid "%s: Seeking failed when trying to create a sparse file: %s"
msgstr "%s: Zmiana pozycji nie powiodła się podczas próby utworzenia pliku rzadkiego: %s" msgstr "%s: Zmiana pozycji nie powiodła się podczas próby utworzenia pliku rzadkiego: %s"
#: src/xz/file_io.c:1039 #: src/xz/file_io.c:1157
#, c-format #, c-format
msgid "%s: Read error: %s" msgid "%s: Read error: %s"
msgstr "%s: Błąd odczytu: %s" msgstr "%s: Błąd odczytu: %s"
#: src/xz/file_io.c:1059 #: src/xz/file_io.c:1177
#, c-format #, c-format
msgid "%s: Error seeking the file: %s" msgid "%s: Error seeking the file: %s"
msgstr "%s: Błąd podczas zmiany pozycji w pliku: %s" msgstr "%s: Błąd podczas zmiany pozycji w pliku: %s"
#: src/xz/file_io.c:1069 #: src/xz/file_io.c:1187
#, c-format #, c-format
msgid "%s: Unexpected end of file" msgid "%s: Unexpected end of file"
msgstr "%s: Nieoczekiwany koniec pliku" msgstr "%s: Nieoczekiwany koniec pliku"
#: src/xz/file_io.c:1128 #: src/xz/file_io.c:1246
#, c-format #, c-format
msgid "%s: Write error: %s" msgid "%s: Write error: %s"
msgstr "%s: Błąd zapisu: %s" msgstr "%s: Błąd zapisu: %s"
@ -332,41 +343,41 @@ msgstr "%s: Za mały na poprawny plik .xz"
#. to Ratio, the columns are right aligned. Check and Filename #. to Ratio, the columns are right aligned. Check and Filename
#. are left aligned. If you need longer words, it's OK to #. are left aligned. If you need longer words, it's OK to
#. use two lines here. Test with "xz -l foo.xz". #. use two lines here. Test with "xz -l foo.xz".
#: src/xz/list.c:671 #: src/xz/list.c:677
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
msgstr "Strum. Bloki Spakowany Rozpakowany Wsp. Kontrola Nazwa pliku" msgstr "Strum. Bloki Spakowany Rozpakowany Wsp. Kontrola Nazwa pliku"
#: src/xz/list.c:711 #: src/xz/list.c:717
#, c-format #, c-format
msgid " Streams: %s\n" msgid " Streams: %s\n"
msgstr " Strumienie: %s\n" msgstr " Strumienie: %s\n"
#: src/xz/list.c:713 #: src/xz/list.c:719
#, c-format #, c-format
msgid " Blocks: %s\n" msgid " Blocks: %s\n"
msgstr " Bloki: %s\n" msgstr " Bloki: %s\n"
#: src/xz/list.c:715 #: src/xz/list.c:721
#, c-format #, c-format
msgid " Compressed size: %s\n" msgid " Compressed size: %s\n"
msgstr " Rozmiar spakowany: %s\n" msgstr " Rozmiar spakowany: %s\n"
#: src/xz/list.c:718 #: src/xz/list.c:724
#, c-format #, c-format
msgid " Uncompressed size: %s\n" msgid " Uncompressed size: %s\n"
msgstr " Rozmiar rozpakowany: %s\n" msgstr " Rozmiar rozpakowany: %s\n"
#: src/xz/list.c:721 #: src/xz/list.c:727
#, c-format #, c-format
msgid " Ratio: %s\n" msgid " Ratio: %s\n"
msgstr " Współczynnik: %s\n" msgstr " Współczynnik: %s\n"
#: src/xz/list.c:723 #: src/xz/list.c:729
#, c-format #, c-format
msgid " Check: %s\n" msgid " Check: %s\n"
msgstr " Kontrola spójności: %s\n" msgstr " Kontrola spójności: %s\n"
#: src/xz/list.c:724 #: src/xz/list.c:730
#, c-format #, c-format
msgid " Stream padding: %s\n" msgid " Stream padding: %s\n"
msgstr " Wyrównanie strumienia: %s\n" msgstr " Wyrównanie strumienia: %s\n"
@ -374,7 +385,7 @@ msgstr " Wyrównanie strumienia: %s\n"
#. TRANSLATORS: The second line is column headings. All except #. TRANSLATORS: The second line is column headings. All except
#. Check are right aligned; Check is left aligned. Test with #. Check are right aligned; Check is left aligned. Test with
#. "xz -lv foo.xz". #. "xz -lv foo.xz".
#: src/xz/list.c:752 #: src/xz/list.c:758
msgid "" msgid ""
" Streams:\n" " Streams:\n"
" Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding" " Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
@ -384,7 +395,7 @@ msgstr ""
#. TRANSLATORS: The second line is column headings. All #. TRANSLATORS: The second line is column headings. All
#. except Check are right aligned; Check is left aligned. #. except Check are right aligned; Check is left aligned.
#: src/xz/list.c:807 #: src/xz/list.c:813
#, c-format #, c-format
msgid "" msgid ""
" Blocks:\n" " Blocks:\n"
@ -400,37 +411,37 @@ msgstr ""
#. are right aligned. %*s is replaced with 0-120 #. are right aligned. %*s is replaced with 0-120
#. spaces to make the CheckVal column wide enough. #. spaces to make the CheckVal column wide enough.
#. Test with "xz -lvv foo.xz". #. Test with "xz -lvv foo.xz".
#: src/xz/list.c:819 #: src/xz/list.c:825
#, c-format #, c-format
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters" msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
msgstr " S.kontr. %*sNagłówek Flagi Rozm. spak. Uż.pamięci Filtry" msgstr " S.kontr. %*sNagłówek Flagi Rozm. spak. Uż.pamięci Filtry"
#: src/xz/list.c:897 src/xz/list.c:1072 #: src/xz/list.c:903 src/xz/list.c:1078
#, c-format #, c-format
msgid " Memory needed: %s MiB\n" msgid " Memory needed: %s MiB\n"
msgstr " Wymagana pamięć: %s MiB\n" msgstr " Wymagana pamięć: %s MiB\n"
#: src/xz/list.c:899 src/xz/list.c:1074 #: src/xz/list.c:905 src/xz/list.c:1080
#, c-format #, c-format
msgid " Sizes in headers: %s\n" msgid " Sizes in headers: %s\n"
msgstr " Rozmiar w nagłówkach: %s\n" msgstr " Rozmiar w nagłówkach: %s\n"
#: src/xz/list.c:900 src/xz/list.c:1075 #: src/xz/list.c:906 src/xz/list.c:1081
msgid "Yes" msgid "Yes"
msgstr "Tak" msgstr "Tak"
#: src/xz/list.c:900 src/xz/list.c:1075 #: src/xz/list.c:906 src/xz/list.c:1081
msgid "No" msgid "No"
msgstr "Nie" msgstr "Nie"
#: src/xz/list.c:901 src/xz/list.c:1076 #: src/xz/list.c:907 src/xz/list.c:1082
#, c-format #, c-format
msgid " Minimum XZ Utils version: %s\n" msgid " Minimum XZ Utils version: %s\n"
msgstr " Minimalna wersja XZ Utils: %s\n" msgstr " Minimalna wersja XZ Utils: %s\n"
#. TRANSLATORS: %s is an integer. Only the plural form of this #. TRANSLATORS: %s is an integer. Only the plural form of this
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz". #. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
#: src/xz/list.c:1051 #: src/xz/list.c:1057
#, c-format #, c-format
msgid "%s file\n" msgid "%s file\n"
msgid_plural "%s files\n" msgid_plural "%s files\n"
@ -438,20 +449,20 @@ msgstr[0] "%s plik\n"
msgstr[1] "%s pliki\n" msgstr[1] "%s pliki\n"
msgstr[2] "%s plików\n" msgstr[2] "%s plików\n"
#: src/xz/list.c:1064 #: src/xz/list.c:1070
msgid "Totals:" msgid "Totals:"
msgstr "Sumarycznie:" msgstr "Sumarycznie:"
#: src/xz/list.c:1065 #: src/xz/list.c:1071
#, c-format #, c-format
msgid " Number of files: %s\n" msgid " Number of files: %s\n"
msgstr " Liczba plików: %s\n" msgstr " Liczba plików: %s\n"
#: src/xz/list.c:1140 #: src/xz/list.c:1146
msgid "--list works only on .xz files (--format=xz or --format=auto)" msgid "--list works only on .xz files (--format=xz or --format=auto)"
msgstr "--list działa tylko z plikami .xz (--format=xz lub --format=auto)" msgstr "--list działa tylko z plikami .xz (--format=xz lub --format=auto)"
#: src/xz/list.c:1146 #: src/xz/list.c:1152
msgid "--list does not support reading from standard input" msgid "--list does not support reading from standard input"
msgstr "--list nie obsługuje odczytu ze standardowego wejścia" msgstr "--list nie obsługuje odczytu ze standardowego wejścia"
@ -474,7 +485,7 @@ msgstr "%s: Napotkano znak NUL podczas odczytu nazw plików; może miało być `
msgid "Compression and decompression with --robot are not supported yet." msgid "Compression and decompression with --robot are not supported yet."
msgstr "Kompresja i dekompresja z opcją --robot nie jest jeszcze obsługiwana." msgstr "Kompresja i dekompresja z opcją --robot nie jest jeszcze obsługiwana."
#: src/xz/main.c:231 #: src/xz/main.c:252
msgid "Cannot read data from standard input when reading filenames from standard input" msgid "Cannot read data from standard input when reading filenames from standard input"
msgstr "Nie można odczytać danych ze standardowego wejścia przy czytaniu nazw plików ze standardowego wejścia" msgstr "Nie można odczytać danych ze standardowego wejścia przy czytaniu nazw plików ze standardowego wejścia"
@ -482,68 +493,68 @@ msgstr "Nie można odczytać danych ze standardowego wejścia przy czytaniu nazw
#. of the line in messages. Usually it becomes "xz: ". #. of the line in messages. Usually it becomes "xz: ".
#. This is a translatable string because French needs #. This is a translatable string because French needs
#. a space before a colon. #. a space before a colon.
#: src/xz/message.c:713 #: src/xz/message.c:714
#, c-format #, c-format
msgid "%s: " msgid "%s: "
msgstr "%s: " msgstr "%s: "
#: src/xz/message.c:776 src/xz/message.c:826 #: src/xz/message.c:777 src/xz/message.c:827
msgid "Internal error (bug)" msgid "Internal error (bug)"
msgstr "Błąd wewnętrzny" msgstr "Błąd wewnętrzny"
#: src/xz/message.c:783 #: src/xz/message.c:784
msgid "Cannot establish signal handlers" msgid "Cannot establish signal handlers"
msgstr "Nie można ustawić obsługi sygnałów" msgstr "Nie można ustawić obsługi sygnałów"
#: src/xz/message.c:792 #: src/xz/message.c:793
msgid "No integrity check; not verifying file integrity" msgid "No integrity check; not verifying file integrity"
msgstr "Brak kontroli spójności; poprawność plików nie będzie weryfikowana" msgstr "Brak kontroli spójności; poprawność plików nie będzie weryfikowana"
#: src/xz/message.c:795 #: src/xz/message.c:796
msgid "Unsupported type of integrity check; not verifying file integrity" msgid "Unsupported type of integrity check; not verifying file integrity"
msgstr "Nieobsługiwany typ kontroli spójności; poprawność plików nie będzie weryfikowana" msgstr "Nieobsługiwany typ kontroli spójności; poprawność plików nie będzie weryfikowana"
#: src/xz/message.c:802 #: src/xz/message.c:803
msgid "Memory usage limit reached" msgid "Memory usage limit reached"
msgstr "Osiągnięto limit użycia pamięci" msgstr "Osiągnięto limit użycia pamięci"
#: src/xz/message.c:805 #: src/xz/message.c:806
msgid "File format not recognized" msgid "File format not recognized"
msgstr "Nie rozpoznany format pliku" msgstr "Nie rozpoznany format pliku"
#: src/xz/message.c:808 #: src/xz/message.c:809
msgid "Unsupported options" msgid "Unsupported options"
msgstr "Nieobsługiwane opcje" msgstr "Nieobsługiwane opcje"
#: src/xz/message.c:811 #: src/xz/message.c:812
msgid "Compressed data is corrupt" msgid "Compressed data is corrupt"
msgstr "Dane skompresowane są uszkodzone" msgstr "Dane skompresowane są uszkodzone"
#: src/xz/message.c:814 #: src/xz/message.c:815
msgid "Unexpected end of input" msgid "Unexpected end of input"
msgstr "Nieoczekiwany koniec wejścia" msgstr "Nieoczekiwany koniec wejścia"
#: src/xz/message.c:847 #: src/xz/message.c:848
#, c-format #, c-format
msgid "%s MiB of memory is required. The limiter is disabled." msgid "%s MiB of memory is required. The limiter is disabled."
msgstr "Wymagane jest %s MiB pamięci. Limit jest wyłączony." msgstr "Wymagane jest %s MiB pamięci. Limit jest wyłączony."
#: src/xz/message.c:875 #: src/xz/message.c:876
#, c-format #, c-format
msgid "%s MiB of memory is required. The limit is %s." msgid "%s MiB of memory is required. The limit is %s."
msgstr "Wymagane jest %s MiB pamięci. Limit to %s." msgstr "Wymagane jest %s MiB pamięci. Limit to %s."
#: src/xz/message.c:1042 #: src/xz/message.c:1043
#, c-format #, c-format
msgid "%s: Filter chain: %s\n" msgid "%s: Filter chain: %s\n"
msgstr "%s: Łańcuch filtrów: %s\n" msgstr "%s: Łańcuch filtrów: %s\n"
#: src/xz/message.c:1052 #: src/xz/message.c:1053
#, c-format #, c-format
msgid "Try `%s --help' for more information." msgid "Try `%s --help' for more information."
msgstr "Polecenie `%s --help' pokaże więcej informacji." msgstr "Polecenie `%s --help' pokaże więcej informacji."
#: src/xz/message.c:1078 #: src/xz/message.c:1079
#, c-format #, c-format
msgid "" msgid ""
"Usage: %s [OPTION]... [FILE]...\n" "Usage: %s [OPTION]... [FILE]...\n"
@ -554,17 +565,17 @@ msgstr ""
"Kompresja lub dekompresja PLIKÓW w formacie .xz.\n" "Kompresja lub dekompresja PLIKÓW w formacie .xz.\n"
"\n" "\n"
#: src/xz/message.c:1085 #: src/xz/message.c:1086
msgid "Mandatory arguments to long options are mandatory for short options too.\n" msgid "Mandatory arguments to long options are mandatory for short options too.\n"
msgstr "" msgstr ""
"Argumenty obowiązkowe dla opcji długich są obowiązkowe również dla opcji\n" "Argumenty obowiązkowe dla opcji długich są obowiązkowe również dla opcji\n"
"krótkich.\n" "krótkich.\n"
#: src/xz/message.c:1089 #: src/xz/message.c:1090
msgid " Operation mode:\n" msgid " Operation mode:\n"
msgstr " Tryb pracy:\n" msgstr " Tryb pracy:\n"
#: src/xz/message.c:1092 #: src/xz/message.c:1093
msgid "" msgid ""
" -z, --compress force compression\n" " -z, --compress force compression\n"
" -d, --decompress force decompression\n" " -d, --decompress force decompression\n"
@ -576,7 +587,7 @@ msgstr ""
" -t, --test sprawdzenie spójności plików skompresowanych\n" " -t, --test sprawdzenie spójności plików skompresowanych\n"
" -l, --list wypisanie informacji o plikach .xz" " -l, --list wypisanie informacji o plikach .xz"
#: src/xz/message.c:1098 #: src/xz/message.c:1099
msgid "" msgid ""
"\n" "\n"
" Operation modifiers:\n" " Operation modifiers:\n"
@ -584,7 +595,7 @@ msgstr ""
"\n" "\n"
" Modyfikatory operacji:\n" " Modyfikatory operacji:\n"
#: src/xz/message.c:1101 #: src/xz/message.c:1102
msgid "" msgid ""
" -k, --keep keep (don't delete) input files\n" " -k, --keep keep (don't delete) input files\n"
" -f, --force force overwrite of output file and (de)compress links\n" " -f, --force force overwrite of output file and (de)compress links\n"
@ -594,7 +605,7 @@ msgstr ""
" -f, --force nadpisywanie plików wyjściowych i (de)kompresja dowiązań\n" " -f, --force nadpisywanie plików wyjściowych i (de)kompresja dowiązań\n"
" -c, --stdout zapis na standardowe wyjście, nieusuwanie plików wej." " -c, --stdout zapis na standardowe wyjście, nieusuwanie plików wej."
#: src/xz/message.c:1107 #: src/xz/message.c:1108
msgid "" msgid ""
" --single-stream decompress only the first stream, and silently\n" " --single-stream decompress only the first stream, and silently\n"
" ignore possible remaining input data" " ignore possible remaining input data"
@ -602,7 +613,7 @@ msgstr ""
" --single-stream dekompresja tylko pierwszego strumienia, ciche\n" " --single-stream dekompresja tylko pierwszego strumienia, ciche\n"
" zignorowanie pozostałych danych wejściowych" " zignorowanie pozostałych danych wejściowych"
#: src/xz/message.c:1110 #: src/xz/message.c:1111
msgid "" msgid ""
" --no-sparse do not create sparse files when decompressing\n" " --no-sparse do not create sparse files when decompressing\n"
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n" " -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
@ -618,7 +629,7 @@ msgstr ""
" wejścia; muszą być zakończone znakiem nowej linii\n" " wejścia; muszą być zakończone znakiem nowej linii\n"
" --files0[=PLIK] podobnie do --files, ale znakiem kończącym musi być NUL" " --files0[=PLIK] podobnie do --files, ale znakiem kończącym musi być NUL"
#: src/xz/message.c:1119 #: src/xz/message.c:1120
msgid "" msgid ""
"\n" "\n"
" Basic file format and compression options:\n" " Basic file format and compression options:\n"
@ -626,7 +637,7 @@ msgstr ""
"\n" "\n"
" Podstawowe opcje formatu pliku i kompresji:\n" " Podstawowe opcje formatu pliku i kompresji:\n"
#: src/xz/message.c:1121 #: src/xz/message.c:1122
msgid "" msgid ""
" -F, --format=FMT file format to encode or decode; possible values are\n" " -F, --format=FMT file format to encode or decode; possible values are\n"
" `auto' (default), `xz', `lzma', and `raw'\n" " `auto' (default), `xz', `lzma', and `raw'\n"
@ -638,11 +649,11 @@ msgstr ""
" -C, --check=TEST typ kontroli spójności: `none' (ostrożnie!),\n" " -C, --check=TEST typ kontroli spójności: `none' (ostrożnie!),\n"
" `crc32', `crc64' (domyślny) lub `sha256'" " `crc32', `crc64' (domyślny) lub `sha256'"
#: src/xz/message.c:1126 #: src/xz/message.c:1127
msgid " --ignore-check don't verify the integrity check when decompressing" msgid " --ignore-check don't verify the integrity check when decompressing"
msgstr " --ignore-check bez kontroli sprawdzania integralności przy dekompresji" msgstr " --ignore-check bez kontroli sprawdzania integralności przy dekompresji"
#: src/xz/message.c:1130 #: src/xz/message.c:1131
msgid "" msgid ""
" -0 ... -9 compression preset; default is 6; take compressor *and*\n" " -0 ... -9 compression preset; default is 6; take compressor *and*\n"
" decompressor memory usage into account before using 7-9!" " decompressor memory usage into account before using 7-9!"
@ -651,7 +662,7 @@ msgstr ""
" użyciem wartości 7-9 należy wziąć pod uwagę wykorzystanie\n" " użyciem wartości 7-9 należy wziąć pod uwagę wykorzystanie\n"
" pamięci przy kompresji *oraz* dekompresji!" " pamięci przy kompresji *oraz* dekompresji!"
#: src/xz/message.c:1134 #: src/xz/message.c:1135
msgid "" msgid ""
" -e, --extreme try to improve compression ratio by using more CPU time;\n" " -e, --extreme try to improve compression ratio by using more CPU time;\n"
" does not affect decompressor memory requirements" " does not affect decompressor memory requirements"
@ -660,7 +671,7 @@ msgstr ""
" ilości czasu procesora; nie wpływa na wymagania\n" " ilości czasu procesora; nie wpływa na wymagania\n"
" pamięciowe dekompresora" " pamięciowe dekompresora"
#: src/xz/message.c:1138 #: src/xz/message.c:1139
msgid "" msgid ""
" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n" " -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
" to use as many threads as there are processor cores" " to use as many threads as there are processor cores"
@ -668,7 +679,7 @@ msgstr ""
" -T, --threads=ILE użycie maksymalnie ILU wątków; domyślnie 1; 0 oznacza\n" " -T, --threads=ILE użycie maksymalnie ILU wątków; domyślnie 1; 0 oznacza\n"
" tyle, ile jest rdzeni procesorów" " tyle, ile jest rdzeni procesorów"
#: src/xz/message.c:1143 #: src/xz/message.c:1144
msgid "" msgid ""
" --block-size=SIZE\n" " --block-size=SIZE\n"
" start a new .xz block after every SIZE bytes of input;\n" " start a new .xz block after every SIZE bytes of input;\n"
@ -679,7 +690,7 @@ msgstr ""
" opcja służy do ustawienia rozmiaru bloku dla kompresji\n" " opcja służy do ustawienia rozmiaru bloku dla kompresji\n"
" wielowątkowej" " wielowątkowej"
#: src/xz/message.c:1147 #: src/xz/message.c:1148
msgid "" msgid ""
" --block-list=SIZES\n" " --block-list=SIZES\n"
" start a new .xz block after the given comma-separated\n" " start a new .xz block after the given comma-separated\n"
@ -689,7 +700,7 @@ msgstr ""
" rozpoczęcie nowego bloku .xz po rozdzielonych przecinkiem\n" " rozpoczęcie nowego bloku .xz po rozdzielonych przecinkiem\n"
" przedziałach danych nieskompresowanych" " przedziałach danych nieskompresowanych"
#: src/xz/message.c:1151 #: src/xz/message.c:1152
msgid "" msgid ""
" --flush-timeout=TIMEOUT\n" " --flush-timeout=TIMEOUT\n"
" when compressing, if more than TIMEOUT milliseconds has\n" " when compressing, if more than TIMEOUT milliseconds has\n"
@ -701,7 +712,7 @@ msgstr ""
" ostatniegu zapisu bloku, a odczyt kolejnych danych byłby\n" " ostatniegu zapisu bloku, a odczyt kolejnych danych byłby\n"
" blokujący, wszystkie gotowe dane są zapisywane" " blokujący, wszystkie gotowe dane są zapisywane"
#: src/xz/message.c:1157 #: src/xz/message.c:1158
#, no-c-format #, no-c-format
msgid "" msgid ""
" --memlimit-compress=LIMIT\n" " --memlimit-compress=LIMIT\n"
@ -717,7 +728,7 @@ msgstr ""
" dekompresji lub obu; LIMIT jest w bajtach, % RAM lub 0\n" " dekompresji lub obu; LIMIT jest w bajtach, % RAM lub 0\n"
" dla limitów domyślnych" " dla limitów domyślnych"
#: src/xz/message.c:1164 #: src/xz/message.c:1165
msgid "" msgid ""
" --no-adjust if compression settings exceed the memory usage limit,\n" " --no-adjust if compression settings exceed the memory usage limit,\n"
" give an error instead of adjusting the settings downwards" " give an error instead of adjusting the settings downwards"
@ -726,7 +737,7 @@ msgstr ""
" pamięci, zostanie zgłoszony błąd zamiast zmniejszania\n" " pamięci, zostanie zgłoszony błąd zamiast zmniejszania\n"
" ustawień" " ustawień"
#: src/xz/message.c:1170 #: src/xz/message.c:1171
msgid "" msgid ""
"\n" "\n"
" Custom filter chain for compression (alternative for using presets):" " Custom filter chain for compression (alternative for using presets):"
@ -734,7 +745,7 @@ msgstr ""
"\n" "\n"
" Łańcuch własnych filtrów do kompresji (alternatywa do używania -0 .. -9):" " Łańcuch własnych filtrów do kompresji (alternatywa do używania -0 .. -9):"
#: src/xz/message.c:1179 #: src/xz/message.c:1180
msgid "" msgid ""
"\n" "\n"
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n" " --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
@ -763,7 +774,7 @@ msgstr ""
" mf=NAZWA dopasowywacz (hc3, hc4, bt2, bt3, bt4; bt4)\n" " mf=NAZWA dopasowywacz (hc3, hc4, bt2, bt3, bt4; bt4)\n"
" depth=ILE maks. głębokość szukania; 0=auto (domyślne)" " depth=ILE maks. głębokość szukania; 0=auto (domyślne)"
#: src/xz/message.c:1194 #: src/xz/message.c:1195
msgid "" msgid ""
"\n" "\n"
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n" " --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
@ -785,7 +796,7 @@ msgstr ""
" Poprawne OPCJE dla wszystkich filtrów BCJ:\n" " Poprawne OPCJE dla wszystkich filtrów BCJ:\n"
" start=ILE offset początku konwersji (domyślnie=0)" " start=ILE offset początku konwersji (domyślnie=0)"
#: src/xz/message.c:1206 #: src/xz/message.c:1207
msgid "" msgid ""
"\n" "\n"
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n" " --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
@ -797,7 +808,7 @@ msgstr ""
" dist=ILE odległość między bajtami odejmowanymi od\n" " dist=ILE odległość między bajtami odejmowanymi od\n"
" siebie (1-256; 1)" " siebie (1-256; 1)"
#: src/xz/message.c:1214 #: src/xz/message.c:1215
msgid "" msgid ""
"\n" "\n"
" Other options:\n" " Other options:\n"
@ -805,7 +816,7 @@ msgstr ""
"\n" "\n"
" Inne opcje:\n" " Inne opcje:\n"
#: src/xz/message.c:1217 #: src/xz/message.c:1218
msgid "" msgid ""
" -q, --quiet suppress warnings; specify twice to suppress errors too\n" " -q, --quiet suppress warnings; specify twice to suppress errors too\n"
" -v, --verbose be verbose; specify twice for even more verbose" " -v, --verbose be verbose; specify twice for even more verbose"
@ -813,15 +824,15 @@ msgstr ""
" -q, --quiet pominięcie ostrzeżeń; dwukrotne podanie pomija też błędy\n" " -q, --quiet pominięcie ostrzeżeń; dwukrotne podanie pomija też błędy\n"
" -v, --verbose więcej informacji; dwukrotne podanie to jeszcze więcej" " -v, --verbose więcej informacji; dwukrotne podanie to jeszcze więcej"
#: src/xz/message.c:1222 #: src/xz/message.c:1223
msgid " -Q, --no-warn make warnings not affect the exit status" msgid " -Q, --no-warn make warnings not affect the exit status"
msgstr " -Q, --no-warn ostrzeżenia nie mają wpływu na status zakończenia" msgstr " -Q, --no-warn ostrzeżenia nie mają wpływu na status zakończenia"
#: src/xz/message.c:1224 #: src/xz/message.c:1225
msgid " --robot use machine-parsable messages (useful for scripts)" msgid " --robot use machine-parsable messages (useful for scripts)"
msgstr " --robot komunikaty w formacie dla maszyny (do skryptów)" msgstr " --robot komunikaty w formacie dla maszyny (do skryptów)"
#: src/xz/message.c:1227 #: src/xz/message.c:1228
msgid "" msgid ""
" --info-memory display the total amount of RAM and the currently active\n" " --info-memory display the total amount of RAM and the currently active\n"
" memory usage limits, and exit" " memory usage limits, and exit"
@ -829,7 +840,7 @@ msgstr ""
" --info-memory wyświetlenie całkowitej ilości pamięci RAM oraz aktualnie\n" " --info-memory wyświetlenie całkowitej ilości pamięci RAM oraz aktualnie\n"
" aktywnych limitów pamięci i zakończenie pracy" " aktywnych limitów pamięci i zakończenie pracy"
#: src/xz/message.c:1230 #: src/xz/message.c:1231
msgid "" msgid ""
" -h, --help display the short help (lists only the basic options)\n" " -h, --help display the short help (lists only the basic options)\n"
" -H, --long-help display this long help and exit" " -H, --long-help display this long help and exit"
@ -837,7 +848,7 @@ msgstr ""
" -h, --help wyświetlenie krótkiego opisu (tylko podstawowe opcje)\n" " -h, --help wyświetlenie krótkiego opisu (tylko podstawowe opcje)\n"
" -H, --long-help wyświetlenie tego długiego opisu i zakończenie" " -H, --long-help wyświetlenie tego długiego opisu i zakończenie"
#: src/xz/message.c:1234 #: src/xz/message.c:1235
msgid "" msgid ""
" -h, --help display this short help and exit\n" " -h, --help display this short help and exit\n"
" -H, --long-help display the long help (lists also the advanced options)" " -H, --long-help display the long help (lists also the advanced options)"
@ -845,11 +856,11 @@ msgstr ""
" -h, --help wyświetlenie tego krótkiego opisu i zakończenie\n" " -h, --help wyświetlenie tego krótkiego opisu i zakończenie\n"
" -H, --long-help wyświetlenie długiego opisu (także opcje zaawansowane)" " -H, --long-help wyświetlenie długiego opisu (także opcje zaawansowane)"
#: src/xz/message.c:1239 #: src/xz/message.c:1240
msgid " -V, --version display the version number and exit" msgid " -V, --version display the version number and exit"
msgstr " -V, --version wyświetlenie informacji o wersji i zakończenie" msgstr " -V, --version wyświetlenie informacji o wersji i zakończenie"
#: src/xz/message.c:1241 #: src/xz/message.c:1242
msgid "" msgid ""
"\n" "\n"
"With no FILE, or when FILE is -, read standard input.\n" "With no FILE, or when FILE is -, read standard input.\n"
@ -861,7 +872,7 @@ msgstr ""
#. for this package. Please add _another line_ saying #. for this package. Please add _another line_ saying
#. "Report translation bugs to <...>\n" with the email or WWW #. "Report translation bugs to <...>\n" with the email or WWW
#. address for translation bugs. Thanks. #. address for translation bugs. Thanks.
#: src/xz/message.c:1247 #: src/xz/message.c:1248
#, c-format #, c-format
msgid "Report bugs to <%s> (in English or Finnish).\n" msgid "Report bugs to <%s> (in English or Finnish).\n"
msgstr "" msgstr ""
@ -870,12 +881,12 @@ msgstr ""
"Błędy w tłumaczeniu prosimy zgłaszać na adres\n" "Błędy w tłumaczeniu prosimy zgłaszać na adres\n"
"<translation-team-pl@lists.sourceforge.net>.\n" "<translation-team-pl@lists.sourceforge.net>.\n"
#: src/xz/message.c:1249 #: src/xz/message.c:1250
#, c-format #, c-format
msgid "%s home page: <%s>\n" msgid "%s home page: <%s>\n"
msgstr "Strona domowa %s: <%s>\n" msgstr "Strona domowa %s: <%s>\n"
#: src/xz/message.c:1253 #: src/xz/message.c:1254
msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
msgstr "TA WERSJA JEST ROZWOJOWA, NIE PRZEZNACZONA DO UŻYTKU PRODUKCYJNEGO." msgstr "TA WERSJA JEST ROZWOJOWA, NIE PRZEZNACZONA DO UŻYTKU PRODUKCYJNEGO."

1001
po/pt_BR.po Normal file

File diff suppressed because it is too large Load Diff

409
po/vi.po
View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: xz 5.1.4beta\n" "Project-Id-Version: xz 5.1.4beta\n"
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n" "Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
"POT-Creation-Date: 2014-09-25 08:57+0700\n" "POT-Creation-Date: 2018-04-29 18:19+0300\n"
"PO-Revision-Date: 2014-09-25 09:06+0700\n" "PO-Revision-Date: 2014-09-25 09:06+0700\n"
"Last-Translator: Trần Ngọc Quân <vnwildman@gmail.com>\n" "Last-Translator: Trần Ngọc Quân <vnwildman@gmail.com>\n"
"Language-Team: Vietnamese <translation-team-vi@lists.sourceforge.net>\n" "Language-Team: Vietnamese <translation-team-vi@lists.sourceforge.net>\n"
@ -51,6 +51,14 @@ msgstr "Chỉ được đưa ra một tập tin cho “--files” hay “--files
msgid "The environment variable %s contains too many arguments" msgid "The environment variable %s contains too many arguments"
msgstr "Biến môi trường %s chứa quá nhiều đối số" msgstr "Biến môi trường %s chứa quá nhiều đối số"
#: src/xz/args.c:643
msgid "Compression support was disabled at build time"
msgstr ""
#: src/xz/args.c:650
msgid "Decompression support was disabled at build time"
msgstr ""
#: src/xz/coder.c:110 #: src/xz/coder.c:110
msgid "Maximum number of filters is four" msgid "Maximum number of filters is four"
msgstr "Số lượng bộ lọc tối đa là bốn" msgstr "Số lượng bộ lọc tối đa là bốn"
@ -65,9 +73,7 @@ msgstr "Dùng hiện tại trong chế độ thô là ngớ ngẩn."
#: src/xz/coder.c:161 #: src/xz/coder.c:161
msgid "The exact options of the presets may vary between software versions." msgid "The exact options of the presets may vary between software versions."
msgstr "" msgstr "Các tùy chọn trích xuất của chỉnh trước có thể biến đổi phụ thuộc vào phiên bản."
"Các tùy chọn trích xuất của chỉnh trước có thể biến đổi phụ thuộc vào phiên "
"bản."
#: src/xz/coder.c:184 #: src/xz/coder.c:184
msgid "The .lzma format supports only the LZMA1 filter" msgid "The .lzma format supports only the LZMA1 filter"
@ -85,44 +91,48 @@ msgstr "Móc xích lọc là không tương thích với --flush-timeout"
msgid "Switching to single-threaded mode due to --flush-timeout" msgid "Switching to single-threaded mode due to --flush-timeout"
msgstr "Chuyển sang chế độ đơn tuyến trình bởi vì --flush-timeout" msgstr "Chuyển sang chế độ đơn tuyến trình bởi vì --flush-timeout"
#: src/xz/coder.c:234 #: src/xz/coder.c:235
#, c-format #, c-format
msgid "Using up to %<PRIu32> threads." msgid "Using up to %<PRIu32> threads."
msgstr "Dùng đến %<PRIu32> tuyến trình." msgstr "Dùng đến %<PRIu32> tuyến trình."
#: src/xz/coder.c:247 #: src/xz/coder.c:251
msgid "Unsupported filter chain or filter options" msgid "Unsupported filter chain or filter options"
msgstr "Không hỗ trợ lọc móc xích hay tùy chọn lọc" msgstr "Không hỗ trợ lọc móc xích hay tùy chọn lọc"
#: src/xz/coder.c:255 #: src/xz/coder.c:263
#, c-format #, c-format
msgid "Decompression will need %s MiB of memory." msgid "Decompression will need %s MiB of memory."
msgstr "Giải nén sẽ cần %s MiB bộ nhớ." msgstr "Giải nén sẽ cần %s MiB bộ nhớ."
#: src/xz/coder.c:290 #: src/xz/coder.c:300
#, c-format #, c-format
msgid "" msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
"Adjusted the number of threads from %s to %s to not exceed the memory usage " msgstr "Chỉnh số lượng tuyến trình từ %s thành %s để không vượt quá giới hạn tiêu dùng bộ nhớ là %s MiB"
"limit of %s MiB"
msgstr ""
"Chỉnh số lượng tuyến trình từ %s thành %s để không vượt quá giới hạn tiêu "
"dùng bộ nhớ là %s MiB"
#: src/xz/coder.c:344 #: src/xz/coder.c:354
#, c-format #, c-format
msgid "" msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
"Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the " msgstr "Chỉnh cỡ từ điển LZMA%c từ %s MiB thành %s MiB để không vượt quá giới hạn tiêu dùng bộ nhớ là %s MiB"
"memory usage limit of %s MiB"
msgstr ""
"Chỉnh cỡ từ điển LZMA%c từ %s MiB thành %s MiB để không vượt quá giới hạn "
"tiêu dùng bộ nhớ là %s MiB"
#: src/xz/file_io.c:90 #: src/xz/file_io.c:110 src/xz/file_io.c:118
#, c-format #, c-format
msgid "Error creating a pipe: %s" msgid "Error creating a pipe: %s"
msgstr "Gặp lỗi khi tạo một ống dẫn: %s" msgstr "Gặp lỗi khi tạo một ống dẫn: %s"
#: src/xz/file_io.c:166 #: src/xz/file_io.c:173
msgid "Sandbox is disabled due to incompatible command line arguments"
msgstr ""
#: src/xz/file_io.c:216
msgid "Sandbox was successfully enabled"
msgstr ""
#: src/xz/file_io.c:220
msgid "Failed to enable the sandbox"
msgstr ""
#: src/xz/file_io.c:262
#, c-format #, c-format
msgid "%s: poll() failed: %s" msgid "%s: poll() failed: %s"
msgstr "%s: hàm poll() bị lỗi: %s" msgstr "%s: hàm poll() bị lỗi: %s"
@ -137,118 +147,107 @@ msgstr "%s: hàm poll() bị lỗi: %s"
#. it is possible that the user has put a new file in place #. it is possible that the user has put a new file in place
#. of the original file, and in that case it obviously #. of the original file, and in that case it obviously
#. shouldn't be removed. #. shouldn't be removed.
#: src/xz/file_io.c:236 #: src/xz/file_io.c:332
#, c-format #, c-format
msgid "%s: File seems to have been moved, not removing" msgid "%s: File seems to have been moved, not removing"
msgstr "%s: Tập tin có lẽ đã bị di chuyển, không phải gỡ bỏ" msgstr "%s: Tập tin có lẽ đã bị di chuyển, không phải gỡ bỏ"
#: src/xz/file_io.c:243 src/xz/file_io.c:761 #: src/xz/file_io.c:339 src/xz/file_io.c:878
#, c-format #, c-format
msgid "%s: Cannot remove: %s" msgid "%s: Cannot remove: %s"
msgstr "%s: Không thể gỡ bỏ: %s" msgstr "%s: Không thể gỡ bỏ: %s"
#: src/xz/file_io.c:268 #: src/xz/file_io.c:364
#, c-format #, c-format
msgid "%s: Cannot set the file owner: %s" msgid "%s: Cannot set the file owner: %s"
msgstr "%s: Không thể đặt chủ sở hữu tập tin: %s" msgstr "%s: Không thể đặt chủ sở hữu tập tin: %s"
#: src/xz/file_io.c:274 #: src/xz/file_io.c:370
#, c-format #, c-format
msgid "%s: Cannot set the file group: %s" msgid "%s: Cannot set the file group: %s"
msgstr "%s: Không thể đặt nhóm tập tin: %s" msgstr "%s: Không thể đặt nhóm tập tin: %s"
#: src/xz/file_io.c:293 #: src/xz/file_io.c:389
#, c-format #, c-format
msgid "%s: Cannot set the file permissions: %s" msgid "%s: Cannot set the file permissions: %s"
msgstr "%s: Không thể đặt chế độ đọc ghi cho tập tin: %s" msgstr "%s: Không thể đặt chế độ đọc ghi cho tập tin: %s"
#: src/xz/file_io.c:399 #: src/xz/file_io.c:515
#, c-format #, c-format
msgid "Error getting the file status flags from standard input: %s" msgid "Error getting the file status flags from standard input: %s"
msgstr "Gặp lỗi khi lấy các cờ trạng thái tập tin từ đầu vào tiêu chuẩn: %s" msgstr "Gặp lỗi khi lấy các cờ trạng thái tập tin từ đầu vào tiêu chuẩn: %s"
#: src/xz/file_io.c:408 #: src/xz/file_io.c:572 src/xz/file_io.c:634
#, c-format
msgid "Error setting O_NONBLOCK on standard input: %s"
msgstr "Lỗi cài đặt O_NONBLOCK trên đầu vào tiêu chuẩn: %s"
#: src/xz/file_io.c:460 src/xz/file_io.c:522
#, c-format #, c-format
msgid "%s: Is a symbolic link, skipping" msgid "%s: Is a symbolic link, skipping"
msgstr "%s: Là một liên kết mềm nên bỏ qua" msgstr "%s: Là một liên kết mềm nên bỏ qua"
#: src/xz/file_io.c:551 #: src/xz/file_io.c:663
#, c-format #, c-format
msgid "%s: Is a directory, skipping" msgid "%s: Is a directory, skipping"
msgstr "%s: Không phải là một thư mục nên bỏ qua" msgstr "%s: Không phải là một thư mục nên bỏ qua"
#: src/xz/file_io.c:557 #: src/xz/file_io.c:669
#, c-format #, c-format
msgid "%s: Not a regular file, skipping" msgid "%s: Not a regular file, skipping"
msgstr "%s: Không phải là tập tin thường nên bỏ qua" msgstr "%s: Không phải là tập tin thường nên bỏ qua"
#: src/xz/file_io.c:574 #: src/xz/file_io.c:686
#, c-format #, c-format
msgid "%s: File has setuid or setgid bit set, skipping" msgid "%s: File has setuid or setgid bit set, skipping"
msgstr "%s: Tập tin có đặt bít setuid hoặc setgid nên bỏ qua" msgstr "%s: Tập tin có đặt bít setuid hoặc setgid nên bỏ qua"
#: src/xz/file_io.c:581 #: src/xz/file_io.c:693
#, c-format #, c-format
msgid "%s: File has sticky bit set, skipping" msgid "%s: File has sticky bit set, skipping"
msgstr "%s: Tập tin có bít sticky nên bỏ qua" msgstr "%s: Tập tin có bít sticky nên bỏ qua"
#: src/xz/file_io.c:588 #: src/xz/file_io.c:700
#, c-format #, c-format
msgid "%s: Input file has more than one hard link, skipping" msgid "%s: Input file has more than one hard link, skipping"
msgstr "%s: Tập tin đầu vào có nhiều hơn một liên kết cứng nên bỏ qua" msgstr "%s: Tập tin đầu vào có nhiều hơn một liên kết cứng nên bỏ qua"
#: src/xz/file_io.c:668 #: src/xz/file_io.c:788
#, c-format #, c-format
msgid "Error restoring the status flags to standard input: %s" msgid "Error restoring the status flags to standard input: %s"
msgstr "Gặp lỗi khi phục hồi các cờ trạng thái tới đầu vào tiêu chuẩn: %s" msgstr "Gặp lỗi khi phục hồi các cờ trạng thái tới đầu vào tiêu chuẩn: %s"
#: src/xz/file_io.c:714 #: src/xz/file_io.c:836
#, c-format #, c-format
msgid "Error getting the file status flags from standard output: %s" msgid "Error getting the file status flags from standard output: %s"
msgstr "Gặp lỗi khi lấy các cờ trạng thái tập tin từ đầu vào tiêu chuẩn: %s" msgstr "Gặp lỗi khi lấy các cờ trạng thái tập tin từ đầu vào tiêu chuẩn: %s"
#: src/xz/file_io.c:723 #: src/xz/file_io.c:1014
#, c-format
msgid "Error setting O_NONBLOCK on standard output: %s"
msgstr "Lỗi cài đặt O_NONBLOCK trên đầu ra tiêu chuẩn: %s"
#: src/xz/file_io.c:896
#, c-format #, c-format
msgid "Error restoring the O_APPEND flag to standard output: %s" msgid "Error restoring the O_APPEND flag to standard output: %s"
msgstr "Gặp lỗi khi phục hồi cờ O_APPEND trên đầu ra tiêu chuẩn: %s" msgstr "Gặp lỗi khi phục hồi cờ O_APPEND trên đầu ra tiêu chuẩn: %s"
#: src/xz/file_io.c:908 #: src/xz/file_io.c:1026
#, c-format #, c-format
msgid "%s: Closing the file failed: %s" msgid "%s: Closing the file failed: %s"
msgstr "%s: Gặp lỗi khi đóng tập tin: %s" msgstr "%s: Gặp lỗi khi đóng tập tin: %s"
#: src/xz/file_io.c:944 src/xz/file_io.c:1170 #: src/xz/file_io.c:1062 src/xz/file_io.c:1288
#, c-format #, c-format
msgid "%s: Seeking failed when trying to create a sparse file: %s" msgid "%s: Seeking failed when trying to create a sparse file: %s"
msgstr "" msgstr "%s: Gặp lỗi khi di chuyển vị trí đọc khi cố tạo một tập tin rải rác: %s"
"%s: Gặp lỗi khi di chuyển vị trí đọc khi cố tạo một tập tin rải rác: %s"
#: src/xz/file_io.c:1039 #: src/xz/file_io.c:1157
#, c-format #, c-format
msgid "%s: Read error: %s" msgid "%s: Read error: %s"
msgstr "%s: Lỗi đọc: %s" msgstr "%s: Lỗi đọc: %s"
#: src/xz/file_io.c:1059 #: src/xz/file_io.c:1177
#, c-format #, c-format
msgid "%s: Error seeking the file: %s" msgid "%s: Error seeking the file: %s"
msgstr "%s: Gặp lỗi khi di chuyển vị trí đọc tập tin: %s" msgstr "%s: Gặp lỗi khi di chuyển vị trí đọc tập tin: %s"
#: src/xz/file_io.c:1069 #: src/xz/file_io.c:1187
#, c-format #, c-format
msgid "%s: Unexpected end of file" msgid "%s: Unexpected end of file"
msgstr "%s: Kết thúc tập tin bất ngờ" msgstr "%s: Kết thúc tập tin bất ngờ"
#: src/xz/file_io.c:1128 #: src/xz/file_io.c:1246
#, c-format #, c-format
msgid "%s: Write error: %s" msgid "%s: Write error: %s"
msgstr "%s: Lỗi ghi: %s" msgstr "%s: Lỗi ghi: %s"
@ -345,41 +344,41 @@ msgstr "%s: Là quá nhỏ đối với tập tin .xz hợp lệ"
#. to Ratio, the columns are right aligned. Check and Filename #. to Ratio, the columns are right aligned. Check and Filename
#. are left aligned. If you need longer words, it's OK to #. are left aligned. If you need longer words, it's OK to
#. use two lines here. Test with "xz -l foo.xz". #. use two lines here. Test with "xz -l foo.xz".
#: src/xz/list.c:671 #: src/xz/list.c:677
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename" msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
msgstr "Luồng Khối Nén Giải nén Tỷ lệ Ktra Tập tin" msgstr "Luồng Khối Nén Giải nén Tỷ lệ Ktra Tập tin"
#: src/xz/list.c:711 #: src/xz/list.c:717
#, c-format #, c-format
msgid " Streams: %s\n" msgid " Streams: %s\n"
msgstr " Luồng dữ liệu: %s\n" msgstr " Luồng dữ liệu: %s\n"
#: src/xz/list.c:713 #: src/xz/list.c:719
#, c-format #, c-format
msgid " Blocks: %s\n" msgid " Blocks: %s\n"
msgstr " Khối: %s\n" msgstr " Khối: %s\n"
#: src/xz/list.c:715 #: src/xz/list.c:721
#, c-format #, c-format
msgid " Compressed size: %s\n" msgid " Compressed size: %s\n"
msgstr " Cỡ khi bị nén: %s\n" msgstr " Cỡ khi bị nén: %s\n"
#: src/xz/list.c:718 #: src/xz/list.c:724
#, c-format #, c-format
msgid " Uncompressed size: %s\n" msgid " Uncompressed size: %s\n"
msgstr " Cỡ sau giải nén: %s\n" msgstr " Cỡ sau giải nén: %s\n"
#: src/xz/list.c:721 #: src/xz/list.c:727
#, c-format #, c-format
msgid " Ratio: %s\n" msgid " Ratio: %s\n"
msgstr " Tỷ lệ nén: %s\n" msgstr " Tỷ lệ nén: %s\n"
#: src/xz/list.c:723 #: src/xz/list.c:729
#, c-format #, c-format
msgid " Check: %s\n" msgid " Check: %s\n"
msgstr " Kiểm tra: %s\n" msgstr " Kiểm tra: %s\n"
#: src/xz/list.c:724 #: src/xz/list.c:730
#, c-format #, c-format
msgid " Stream padding: %s\n" msgid " Stream padding: %s\n"
msgstr " Đệm luồng dữ liệu: %s\n" msgstr " Đệm luồng dữ liệu: %s\n"
@ -387,28 +386,24 @@ msgstr " Đệm luồng dữ liệu: %s\n"
#. TRANSLATORS: The second line is column headings. All except #. TRANSLATORS: The second line is column headings. All except
#. Check are right aligned; Check is left aligned. Test with #. Check are right aligned; Check is left aligned. Test with
#. "xz -lv foo.xz". #. "xz -lv foo.xz".
#: src/xz/list.c:752 #: src/xz/list.c:758
msgid "" msgid ""
" Streams:\n" " Streams:\n"
" Stream Blocks CompOffset UncompOffset CompSize " " Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
"UncompSize Ratio Check Padding"
msgstr "" msgstr ""
" Luồng dữ liệu:\n" " Luồng dữ liệu:\n"
" Luồng Khối BùNén BùGiảiNén CỡNén " " Luồng Khối BùNén BùGiảiNén CỡNén CỡGiảiNén TỷLệ Ktra Đệm"
"CỡGiảiNén TỷLệ Ktra Đệm"
#. TRANSLATORS: The second line is column headings. All #. TRANSLATORS: The second line is column headings. All
#. except Check are right aligned; Check is left aligned. #. except Check are right aligned; Check is left aligned.
#: src/xz/list.c:807 #: src/xz/list.c:813
#, c-format #, c-format
msgid "" msgid ""
" Blocks:\n" " Blocks:\n"
" Stream Block CompOffset UncompOffset TotalSize " " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
"UncompSize Ratio Check"
msgstr "" msgstr ""
" Khối:\n" " Khối:\n"
" Luồng Khối BùNén BùGiảiNén CỡTổng " " Luồng Khối BùNén BùGiảiNén CỡTổng CỡGiảiNén TỷLệ Ktra"
"CỡGiảiNén TỷLệ Ktra"
#. TRANSLATORS: These are additional column headings #. TRANSLATORS: These are additional column headings
#. for the most verbose listing mode. CheckVal #. for the most verbose listing mode. CheckVal
@ -417,57 +412,56 @@ msgstr ""
#. are right aligned. %*s is replaced with 0-120 #. are right aligned. %*s is replaced with 0-120
#. spaces to make the CheckVal column wide enough. #. spaces to make the CheckVal column wide enough.
#. Test with "xz -lvv foo.xz". #. Test with "xz -lvv foo.xz".
#: src/xz/list.c:819 #: src/xz/list.c:825
#, c-format #, c-format
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters" msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
msgstr " GTrịKiểm %*s Đầu Cờ CỡNén DùngRAM BộLọc" msgstr " GTrịKiểm %*s Đầu Cờ CỡNén DùngRAM BộLọc"
#: src/xz/list.c:897 src/xz/list.c:1072 #: src/xz/list.c:903 src/xz/list.c:1078
#, c-format #, c-format
msgid " Memory needed: %s MiB\n" msgid " Memory needed: %s MiB\n"
msgstr " Bộ nhớ cần: %s MiB\n" msgstr " Bộ nhớ cần: %s MiB\n"
#: src/xz/list.c:899 src/xz/list.c:1074 #: src/xz/list.c:905 src/xz/list.c:1080
#, c-format #, c-format
msgid " Sizes in headers: %s\n" msgid " Sizes in headers: %s\n"
msgstr " Kích cỡ phần đầu: %s\n" msgstr " Kích cỡ phần đầu: %s\n"
#: src/xz/list.c:900 src/xz/list.c:1075 #: src/xz/list.c:906 src/xz/list.c:1081
msgid "Yes" msgid "Yes"
msgstr "Có" msgstr "Có"
#: src/xz/list.c:900 src/xz/list.c:1075 #: src/xz/list.c:906 src/xz/list.c:1081
msgid "No" msgid "No"
msgstr "Không" msgstr "Không"
#: src/xz/list.c:901 src/xz/list.c:1076 #: src/xz/list.c:907 src/xz/list.c:1082
#, c-format #, c-format
msgid " Minimum XZ Utils version: %s\n" msgid " Minimum XZ Utils version: %s\n"
msgstr " Phiên bản “XZ Utils” tối thiểu: %s\n" msgstr " Phiên bản “XZ Utils” tối thiểu: %s\n"
#. TRANSLATORS: %s is an integer. Only the plural form of this #. TRANSLATORS: %s is an integer. Only the plural form of this
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz". #. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
#: src/xz/list.c:1051 #: src/xz/list.c:1057
#, c-format #, c-format
msgid "%s file\n" msgid "%s file\n"
msgid_plural "%s files\n" msgid_plural "%s files\n"
msgstr[0] "%s tập tin\n" msgstr[0] "%s tập tin\n"
#: src/xz/list.c:1064 #: src/xz/list.c:1070
msgid "Totals:" msgid "Totals:"
msgstr "Tổng cộng:" msgstr "Tổng cộng:"
#: src/xz/list.c:1065 #: src/xz/list.c:1071
#, c-format #, c-format
msgid " Number of files: %s\n" msgid " Number of files: %s\n"
msgstr " Số tập tin: %s\n" msgstr " Số tập tin: %s\n"
#: src/xz/list.c:1140
msgid "--list works only on .xz files (--format=xz or --format=auto)"
msgstr ""
"--list chỉ hoạt động trên các tập tin .xz (--format=xz hay --format=auto)"
#: src/xz/list.c:1146 #: src/xz/list.c:1146
msgid "--list works only on .xz files (--format=xz or --format=auto)"
msgstr "--list chỉ hoạt động trên các tập tin .xz (--format=xz hay --format=auto)"
#: src/xz/list.c:1152
msgid "--list does not support reading from standard input" msgid "--list does not support reading from standard input"
msgstr "--list không hỗ trợ đọc từ đầu vào tiêu chuẩn" msgstr "--list không hỗ trợ đọc từ đầu vào tiêu chuẩn"
@ -483,94 +477,83 @@ msgstr "%s: Gặp kết thúc đầu vào bất ngờ khi đọc các tên tập
#: src/xz/main.c:120 #: src/xz/main.c:120
#, c-format #, c-format
msgid "" msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
"%s: Null character found when reading filenames; maybe you meant to use `--" msgstr "%s: Gặp ký hiệu Null khi đọc tên tập tin; có lẽ ý bạn muốn là dùng “--files0” chứ không phải “--files'?"
"files0' instead of `--files'?"
msgstr ""
"%s: Gặp ký hiệu Null khi đọc tên tập tin; có lẽ ý bạn muốn là dùng “--"
"files0” chứ không phải “--files'?"
#: src/xz/main.c:174 #: src/xz/main.c:174
msgid "Compression and decompression with --robot are not supported yet." msgid "Compression and decompression with --robot are not supported yet."
msgstr "Nén và giải nén với --robot vẫn chưa được hỗ trợ." msgstr "Nén và giải nén với --robot vẫn chưa được hỗ trợ."
#: src/xz/main.c:231 #: src/xz/main.c:252
msgid "" msgid "Cannot read data from standard input when reading filenames from standard input"
"Cannot read data from standard input when reading filenames from standard " msgstr "Không thể đọc dữ liệu từ đầu vào tiêu chuẩn khi đọc tập tin từ đầu vào tiêu chuẩn"
"input"
msgstr ""
"Không thể đọc dữ liệu từ đầu vào tiêu chuẩn khi đọc tập tin từ đầu vào tiêu "
"chuẩn"
#. TRANSLATORS: This is the program name in the beginning #. TRANSLATORS: This is the program name in the beginning
#. of the line in messages. Usually it becomes "xz: ". #. of the line in messages. Usually it becomes "xz: ".
#. This is a translatable string because French needs #. This is a translatable string because French needs
#. a space before a colon. #. a space before a colon.
#: src/xz/message.c:713 #: src/xz/message.c:714
#, c-format #, c-format
msgid "%s: " msgid "%s: "
msgstr "%s: " msgstr "%s: "
#: src/xz/message.c:776 src/xz/message.c:826 #: src/xz/message.c:777 src/xz/message.c:827
msgid "Internal error (bug)" msgid "Internal error (bug)"
msgstr "Lỗi nội bộ (lỗi)" msgstr "Lỗi nội bộ (lỗi)"
#: src/xz/message.c:783 #: src/xz/message.c:784
msgid "Cannot establish signal handlers" msgid "Cannot establish signal handlers"
msgstr "Không thể thiết lập bộ xử lý tín hiệu" msgstr "Không thể thiết lập bộ xử lý tín hiệu"
#: src/xz/message.c:792 #: src/xz/message.c:793
msgid "No integrity check; not verifying file integrity" msgid "No integrity check; not verifying file integrity"
msgstr "" msgstr "Không có kiểm tra toàn vẹn nên không thể thẩm tra tính toàn vẹn của tập tin"
"Không có kiểm tra toàn vẹn nên không thể thẩm tra tính toàn vẹn của tập tin"
#: src/xz/message.c:795 #: src/xz/message.c:796
msgid "Unsupported type of integrity check; not verifying file integrity" msgid "Unsupported type of integrity check; not verifying file integrity"
msgstr "" msgstr "Kiểu kiểm tra toàn vẹn chưa được hỗ trợ; nên không thể thẩm tra tính toàn vẹn của tập tin"
"Kiểu kiểm tra toàn vẹn chưa được hỗ trợ; nên không thể thẩm tra tính toàn "
"vẹn của tập tin"
#: src/xz/message.c:802 #: src/xz/message.c:803
msgid "Memory usage limit reached" msgid "Memory usage limit reached"
msgstr "Đã chạm mốc giới hạn sử dụng bộ nhớ" msgstr "Đã chạm mốc giới hạn sử dụng bộ nhớ"
#: src/xz/message.c:805 #: src/xz/message.c:806
msgid "File format not recognized" msgid "File format not recognized"
msgstr "Không nhận ra định dạng tập tin" msgstr "Không nhận ra định dạng tập tin"
#: src/xz/message.c:808 #: src/xz/message.c:809
msgid "Unsupported options" msgid "Unsupported options"
msgstr "Tùy chọn không được hỗ trợ" msgstr "Tùy chọn không được hỗ trợ"
#: src/xz/message.c:811 #: src/xz/message.c:812
msgid "Compressed data is corrupt" msgid "Compressed data is corrupt"
msgstr "Dữ liệu đã nén bị hỏng" msgstr "Dữ liệu đã nén bị hỏng"
#: src/xz/message.c:814 #: src/xz/message.c:815
msgid "Unexpected end of input" msgid "Unexpected end of input"
msgstr "Gặp kết thúc đầu vào bất ngờ" msgstr "Gặp kết thúc đầu vào bất ngờ"
#: src/xz/message.c:847 #: src/xz/message.c:848
#, c-format #, c-format
msgid "%s MiB of memory is required. The limiter is disabled." msgid "%s MiB of memory is required. The limiter is disabled."
msgstr "Yêu cầu cần có %s MiB bộ nhớ. Nhưng giới hạn bị tắt." msgstr "Yêu cầu cần có %s MiB bộ nhớ. Nhưng giới hạn bị tắt."
#: src/xz/message.c:875 #: src/xz/message.c:876
#, c-format #, c-format
msgid "%s MiB of memory is required. The limit is %s." msgid "%s MiB of memory is required. The limit is %s."
msgstr "Yêu cầu cần có %s MiB bộ nhớ. Nhưng giới hạn là %s." msgstr "Yêu cầu cần có %s MiB bộ nhớ. Nhưng giới hạn là %s."
#: src/xz/message.c:1042 #: src/xz/message.c:1043
#, c-format #, c-format
msgid "%s: Filter chain: %s\n" msgid "%s: Filter chain: %s\n"
msgstr "%s: Móc xích lọc: %s\n" msgstr "%s: Móc xích lọc: %s\n"
#: src/xz/message.c:1052 #: src/xz/message.c:1053
#, c-format #, c-format
msgid "Try `%s --help' for more information." msgid "Try `%s --help' for more information."
msgstr "Hãy chạy lệnh “%s --help” để xem thông tin thêm." msgstr "Hãy chạy lệnh “%s --help” để xem thông tin thêm."
#: src/xz/message.c:1078 #: src/xz/message.c:1079
#, c-format #, c-format
msgid "" msgid ""
"Usage: %s [OPTION]... [FILE]...\n" "Usage: %s [OPTION]... [FILE]...\n"
@ -581,17 +564,15 @@ msgstr ""
"Nén hoặc giải nén các TẬP TIN có định dạng .xz.\n" "Nén hoặc giải nén các TẬP TIN có định dạng .xz.\n"
"\n" "\n"
#: src/xz/message.c:1085 #: src/xz/message.c:1086
msgid "" msgid "Mandatory arguments to long options are mandatory for short options too.\n"
"Mandatory arguments to long options are mandatory for short options too.\n" msgstr "Các tùy chọn dài bắt buộc phải có đối số thì với tùy chọn ngắn cũng vậy.\n"
msgstr ""
"Các tùy chọn dài bắt buộc phải có đối số thì với tùy chọn ngắn cũng vậy.\n"
#: src/xz/message.c:1089 #: src/xz/message.c:1090
msgid " Operation mode:\n" msgid " Operation mode:\n"
msgstr " Chế độ thao tác:\n" msgstr " Chế độ thao tác:\n"
#: src/xz/message.c:1092 #: src/xz/message.c:1093
msgid "" msgid ""
" -z, --compress force compression\n" " -z, --compress force compression\n"
" -d, --decompress force decompression\n" " -d, --decompress force decompression\n"
@ -603,7 +584,7 @@ msgstr ""
" -t, --test kiểm tra tính toàn vẹn của tập tin nén\n" " -t, --test kiểm tra tính toàn vẹn của tập tin nén\n"
" -l, --list liệt kê các thông tin về tập tin .xz" " -l, --list liệt kê các thông tin về tập tin .xz"
#: src/xz/message.c:1098 #: src/xz/message.c:1099
msgid "" msgid ""
"\n" "\n"
" Operation modifiers:\n" " Operation modifiers:\n"
@ -611,7 +592,7 @@ msgstr ""
"\n" "\n"
" Bộ chỉnh sửa thao tác:\n" " Bộ chỉnh sửa thao tác:\n"
#: src/xz/message.c:1101 #: src/xz/message.c:1102
msgid "" msgid ""
" -k, --keep keep (don't delete) input files\n" " -k, --keep keep (don't delete) input files\n"
" -f, --force force overwrite of output file and (de)compress links\n" " -f, --force force overwrite of output file and (de)compress links\n"
@ -621,7 +602,7 @@ msgstr ""
" -f, --force buộc ghi đè tập tin đầu ra và (giải) nén các liên kết\n" " -f, --force buộc ghi đè tập tin đầu ra và (giải) nén các liên kết\n"
" -c, --stdout ghi ra đầu ra tiêu chuẩn và không xóa tập tin đầu vào" " -c, --stdout ghi ra đầu ra tiêu chuẩn và không xóa tập tin đầu vào"
#: src/xz/message.c:1107 #: src/xz/message.c:1108
msgid "" msgid ""
" --single-stream decompress only the first stream, and silently\n" " --single-stream decompress only the first stream, and silently\n"
" ignore possible remaining input data" " ignore possible remaining input data"
@ -629,25 +610,23 @@ msgstr ""
" --single-stream chỉ giải nén luồng dữ liệu đầu, và bỏ qua\n" " --single-stream chỉ giải nén luồng dữ liệu đầu, và bỏ qua\n"
" dữ liệu đầu vào còn lại có thể" " dữ liệu đầu vào còn lại có thể"
#: src/xz/message.c:1110 #: src/xz/message.c:1111
msgid "" msgid ""
" --no-sparse do not create sparse files when decompressing\n" " --no-sparse do not create sparse files when decompressing\n"
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n" " -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
" --files[=FILE] read filenames to process from FILE; if FILE is\n" " --files[=FILE] read filenames to process from FILE; if FILE is\n"
" omitted, filenames are read from the standard input;\n" " omitted, filenames are read from the standard input;\n"
" filenames must be terminated with the newline " " filenames must be terminated with the newline character\n"
"character\n"
" --files0[=FILE] like --files but use the null character as terminator" " --files0[=FILE] like --files but use the null character as terminator"
msgstr "" msgstr ""
" --no-sparse đừng tạo các tập tin rải rác khi giải nén\n" " --no-sparse đừng tạo các tập tin rải rác khi giải nén\n"
" -S, --suffix=.ĐUÔI dùng hậu tố “.ĐUÔI” trên các tập tin nén\n" " -S, --suffix=.ĐUÔI dùng hậu tố “.ĐUÔI” trên các tập tin nén\n"
" --files[=TẬP-TIN] đọc các tập tin cần xử lý từ TẬP-TIN; nếu không có\n" " --files[=TẬP-TIN] đọc các tập tin cần xử lý từ TẬP-TIN; nếu không có\n"
" TẬP-TIN thì tên tập tin sẽ được đọc vào từ đầu vào " " TẬP-TIN thì tên tập tin sẽ được đọc vào từ đầu vào tiêu\n"
"tiêu\n"
" chuẩn; chúng phải được kết thúc bằng ký tự dòng mới\n" " chuẩn; chúng phải được kết thúc bằng ký tự dòng mới\n"
" --files0[=TẬP-TIN] giống --files nhưng ký tự kết thúc là null" " --files0[=TẬP-TIN] giống --files nhưng ký tự kết thúc là null"
#: src/xz/message.c:1119 #: src/xz/message.c:1120
msgid "" msgid ""
"\n" "\n"
" Basic file format and compression options:\n" " Basic file format and compression options:\n"
@ -655,46 +634,39 @@ msgstr ""
"\n" "\n"
" Các tùy chọn về định dạng và nén cơ bản:\n" " Các tùy chọn về định dạng và nén cơ bản:\n"
#: src/xz/message.c:1121 #: src/xz/message.c:1122
msgid "" msgid ""
" -F, --format=FMT file format to encode or decode; possible values are\n" " -F, --format=FMT file format to encode or decode; possible values are\n"
" `auto' (default), `xz', `lzma', and `raw'\n" " `auto' (default), `xz', `lzma', and `raw'\n"
" -C, --check=CHECK integrity check type: `none' (use with caution),\n" " -C, --check=CHECK integrity check type: `none' (use with caution),\n"
" `crc32', `crc64' (default), or `sha256'" " `crc32', `crc64' (default), or `sha256'"
msgstr "" msgstr ""
" -F, --format=ĐDạng định dạng tập tin cần mã hóa hoặc giải mã; giá trị có " " -F, --format=ĐDạng định dạng tập tin cần mã hóa hoặc giải mã; giá trị có thể\n"
"thể\n"
" là “auto” (mặc định), “xz”, “lzma”, và “raw”\n" " là “auto” (mặc định), “xz”, “lzma”, và “raw”\n"
" -C, --check=KIỂM kiểu kiểm tra toàn vẹn: “none” (thận trọng khi dùng),\n" " -C, --check=KIỂM kiểu kiểm tra toàn vẹn: “none” (thận trọng khi dùng),\n"
" “crc32”, “crc64” (mặc định), hay “sha256”" " “crc32”, “crc64” (mặc định), hay “sha256”"
#: src/xz/message.c:1126 #: src/xz/message.c:1127
msgid "" msgid " --ignore-check don't verify the integrity check when decompressing"
" --ignore-check don't verify the integrity check when decompressing"
msgstr " --ignore-check không thẩm tra tính toàn vẹn khi giải nén" msgstr " --ignore-check không thẩm tra tính toàn vẹn khi giải nén"
#: src/xz/message.c:1130 #: src/xz/message.c:1131
msgid "" msgid ""
" -0 ... -9 compression preset; default is 6; take compressor " " -0 ... -9 compression preset; default is 6; take compressor *and*\n"
"*and*\n" " decompressor memory usage into account before using 7-9!"
" decompressor memory usage into account before using "
"7-9!"
msgstr "" msgstr ""
" -0 ... -9 đặt mức nén; mặc định là 6; tiêu dùng nhiều bộ nhớ khi " " -0 ... -9 đặt mức nén; mặc định là 6; tiêu dùng nhiều bộ nhớ khi nén\n"
"nén\n"
" và giải nén, nên tính toán trước khi dùng 7-9!" " và giải nén, nên tính toán trước khi dùng 7-9!"
#: src/xz/message.c:1134 #: src/xz/message.c:1135
msgid "" msgid ""
" -e, --extreme try to improve compression ratio by using more CPU " " -e, --extreme try to improve compression ratio by using more CPU time;\n"
"time;\n"
" does not affect decompressor memory requirements" " does not affect decompressor memory requirements"
msgstr "" msgstr ""
" -e, --extreme cố gắng nâng cao mức nén bằng cách dùng nhiều CPU " " -e, --extreme cố gắng nâng cao mức nén bằng cách dùng nhiều CPU hơn;\n"
"hơn;\n"
" nhưng không yêu cần nhiều bộ nhớ khi giải nén" " nhưng không yêu cần nhiều bộ nhớ khi giải nén"
#: src/xz/message.c:1138 #: src/xz/message.c:1139
msgid "" msgid ""
" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n" " -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
" to use as many threads as there are processor cores" " to use as many threads as there are processor cores"
@ -702,18 +674,17 @@ msgstr ""
" -T, --threads=SỐ dùng tối đa là SỐ tuyến trình; mặc định là 1; đặt\n" " -T, --threads=SỐ dùng tối đa là SỐ tuyến trình; mặc định là 1; đặt\n"
" thành 0 để dùng số lượng bằng số lõi vi xử lý" " thành 0 để dùng số lượng bằng số lõi vi xử lý"
#: src/xz/message.c:1143 #: src/xz/message.c:1144
msgid "" msgid ""
" --block-size=SIZE\n" " --block-size=SIZE\n"
" start a new .xz block after every SIZE bytes of " " start a new .xz block after every SIZE bytes of input;\n"
"input;\n"
" use this to set the block size for threaded compression" " use this to set the block size for threaded compression"
msgstr "" msgstr ""
" --block-size=CỠ\n" " --block-size=CỠ\n"
" bắt đầu một khối .xz mới sau mỗi CỠ byte của đầu vào;\n" " bắt đầu một khối .xz mới sau mỗi CỠ byte của đầu vào;\n"
" dùng tùy chọn này để đặt cỡ khối cho nén tuyến trình" " dùng tùy chọn này để đặt cỡ khối cho nén tuyến trình"
#: src/xz/message.c:1147 #: src/xz/message.c:1148
msgid "" msgid ""
" --block-list=SIZES\n" " --block-list=SIZES\n"
" start a new .xz block after the given comma-separated\n" " start a new .xz block after the given comma-separated\n"
@ -723,30 +694,25 @@ msgstr ""
" bắt đầu một khối .xz mới sau một danh sách ngăn\n" " bắt đầu một khối .xz mới sau một danh sách ngăn\n"
" cách bằng dấu phẩy nhịp dữ của dữ liệu chưa nén" " cách bằng dấu phẩy nhịp dữ của dữ liệu chưa nén"
#: src/xz/message.c:1151 #: src/xz/message.c:1152
msgid "" msgid ""
" --flush-timeout=TIMEOUT\n" " --flush-timeout=TIMEOUT\n"
" when compressing, if more than TIMEOUT milliseconds " " when compressing, if more than TIMEOUT milliseconds has\n"
"has\n" " passed since the previous flush and reading more input\n"
" passed since the previous flush and reading more "
"input\n"
" would block, all pending data is flushed out" " would block, all pending data is flushed out"
msgstr "" msgstr ""
" --flush-timeout=THỜI_GIAN_CHỜ\n" " --flush-timeout=THỜI_GIAN_CHỜ\n"
" khi đang nén, nếu đã trải qua hơn THỜI_GIAN_CHỜ milli-" " khi đang nén, nếu đã trải qua hơn THỜI_GIAN_CHỜ milli-giây\n"
"giây\n" " kể từ lần đẩy dữ liệu lên đĩa trước đó và đang đọc thêm\n"
" kể từ lần đẩy dữ liệu lên đĩa trước đó và đang đọc "
"thêm\n"
" khối nữa, mọi dữ liệu đang chờ sẽ được ghi lên đĩa" " khối nữa, mọi dữ liệu đang chờ sẽ được ghi lên đĩa"
#: src/xz/message.c:1157 #: src/xz/message.c:1158
#, no-c-format #, no-c-format
msgid "" msgid ""
" --memlimit-compress=LIMIT\n" " --memlimit-compress=LIMIT\n"
" --memlimit-decompress=LIMIT\n" " --memlimit-decompress=LIMIT\n"
" -M, --memlimit=LIMIT\n" " -M, --memlimit=LIMIT\n"
" set memory usage limit for compression, " " set memory usage limit for compression, decompression,\n"
"decompression,\n"
" or both; LIMIT is in bytes, % of RAM, or 0 for defaults" " or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
msgstr "" msgstr ""
" --memlimit-compress=GIỚI_HẠN\n" " --memlimit-compress=GIỚI_HẠN\n"
@ -756,17 +722,15 @@ msgstr ""
" hoặc cả hai; GIỚI_HẠN có đơn vị là byte, % của RAM,\n" " hoặc cả hai; GIỚI_HẠN có đơn vị là byte, % của RAM,\n"
" hay 0 cho mặc định" " hay 0 cho mặc định"
#: src/xz/message.c:1164 #: src/xz/message.c:1165
msgid "" msgid ""
" --no-adjust if compression settings exceed the memory usage " " --no-adjust if compression settings exceed the memory usage limit,\n"
"limit,\n" " give an error instead of adjusting the settings downwards"
" give an error instead of adjusting the settings "
"downwards"
msgstr "" msgstr ""
" --no-adjust nếu các cài đặt nén vượt quá giới hạn dùng bộ nhớ,\n" " --no-adjust nếu các cài đặt nén vượt quá giới hạn dùng bộ nhớ,\n"
" đưa ra một lỗi thay vì sửa đổi các cài đặt xuống" " đưa ra một lỗi thay vì sửa đổi các cài đặt xuống"
#: src/xz/message.c:1170 #: src/xz/message.c:1171
msgid "" msgid ""
"\n" "\n"
" Custom filter chain for compression (alternative for using presets):" " Custom filter chain for compression (alternative for using presets):"
@ -774,13 +738,11 @@ msgstr ""
"\n" "\n"
" Móc xích lọc tùy chỉnh cho nén (thay cho việc dùng chỉnh trước):" " Móc xích lọc tùy chỉnh cho nén (thay cho việc dùng chỉnh trước):"
#: src/xz/message.c:1179 #: src/xz/message.c:1180
msgid "" msgid ""
"\n" "\n"
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero " " --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
"or\n" " --lzma2[=OPTS] more of the following options (valid values; default):\n"
" --lzma2[=OPTS] more of the following options (valid values; "
"default):\n"
" preset=PRE reset options to a preset (0-9[e])\n" " preset=PRE reset options to a preset (0-9[e])\n"
" dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n" " dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n"
" lc=NUM number of literal context bits (0-4; 3)\n" " lc=NUM number of literal context bits (0-4; 3)\n"
@ -788,14 +750,11 @@ msgid ""
" pb=NUM number of position bits (0-4; 2)\n" " pb=NUM number of position bits (0-4; 2)\n"
" mode=MODE compression mode (fast, normal; normal)\n" " mode=MODE compression mode (fast, normal; normal)\n"
" nice=NUM nice length of a match (2-273; 64)\n" " nice=NUM nice length of a match (2-273; 64)\n"
" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; " " mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n"
"bt4)\n" " depth=NUM maximum search depth; 0=automatic (default)"
" depth=NUM maximum search depth; 0=automatic "
"(default)"
msgstr "" msgstr ""
"\n" "\n"
" --lzma1[=CTC] LZMA1 hay LZMA2; CÁC-TÙY-CHỌN là danh sách của không " " --lzma1[=CTC] LZMA1 hay LZMA2; CÁC-TÙY-CHỌN là danh sách của không hoặc\n"
"hoặc\n"
" --lzma2[=CTC] hơn các tùy chọn sau đây (giá trị hợp lệ; mặc định):\n" " --lzma2[=CTC] hơn các tùy chọn sau đây (giá trị hợp lệ; mặc định):\n"
" preset=PRE các tùy chọn tối ưu nén (0-9[e])\n" " preset=PRE các tùy chọn tối ưu nén (0-9[e])\n"
" dict=SỐ cỡ từ điển (4KiB - 1536MiB; 8MiB)\n" " dict=SỐ cỡ từ điển (4KiB - 1536MiB; 8MiB)\n"
@ -804,12 +763,10 @@ msgstr ""
" pb=SỐ số bít vị trí (0-4; 2)\n" " pb=SỐ số bít vị trí (0-4; 2)\n"
" mode=CHẾ_ĐỘ chế độ nén (fast, normal; normal)\n" " mode=CHẾ_ĐỘ chế độ nén (fast, normal; normal)\n"
" nice=SỐ chiều dài “tốt” của khớp (2-273; 64)\n" " nice=SỐ chiều dài “tốt” của khớp (2-273; 64)\n"
" mf=TÊN bộ tìm khớp (hc3, hc4, bt2, bt3, bt4; " " mf=TÊN bộ tìm khớp (hc3, hc4, bt2, bt3, bt4; bt4)\n"
"bt4)\n" " depth=SỐ mức sâu tìm kiếm tối đa; 0=tự động (mặc định)"
" depth=SỐ mức sâu tìm kiếm tối đa; 0=tự động (mặc "
"định)"
#: src/xz/message.c:1194 #: src/xz/message.c:1195
msgid "" msgid ""
"\n" "\n"
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n" " --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
@ -829,10 +786,9 @@ msgstr ""
" --armthumb[=OPTS] bộ lọc ARM-Thumb BCJ (chỉ little endian)\n" " --armthumb[=OPTS] bộ lọc ARM-Thumb BCJ (chỉ little endian)\n"
" --sparc[=OPTS] bộ lọc SPARC BCJ\n" " --sparc[=OPTS] bộ lọc SPARC BCJ\n"
" các tùy chọn hợp lệ cho mọi bộ lọc BCJ:\n" " các tùy chọn hợp lệ cho mọi bộ lọc BCJ:\n"
" start=SỐ khoảng bù khởi đầu cho chuyển đổi (mặc " " start=SỐ khoảng bù khởi đầu cho chuyển đổi (mặc định=0)"
"định=0)"
#: src/xz/message.c:1206 #: src/xz/message.c:1207
msgid "" msgid ""
"\n" "\n"
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n" " --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
@ -845,7 +801,7 @@ msgstr ""
" dist=SỐ khoảng cách giữa các byte được trừ từ\n" " dist=SỐ khoảng cách giữa các byte được trừ từ\n"
" những cái khác (1-256; 1)" " những cái khác (1-256; 1)"
#: src/xz/message.c:1214 #: src/xz/message.c:1215
msgid "" msgid ""
"\n" "\n"
" Other options:\n" " Other options:\n"
@ -853,39 +809,34 @@ msgstr ""
"\n" "\n"
" Tùy chọn khác:\n" " Tùy chọn khác:\n"
#: src/xz/message.c:1217 #: src/xz/message.c:1218
msgid "" msgid ""
" -q, --quiet suppress warnings; specify twice to suppress errors " " -q, --quiet suppress warnings; specify twice to suppress errors too\n"
"too\n"
" -v, --verbose be verbose; specify twice for even more verbose" " -v, --verbose be verbose; specify twice for even more verbose"
msgstr "" msgstr ""
" -q, --quiet không xuất các cảnh báo;\n" " -q, --quiet không xuất các cảnh báo;\n"
" chỉ định hai lần nến bạn muốn chặn cả báo lỗi\n" " chỉ định hai lần nến bạn muốn chặn cả báo lỗi\n"
" -v, --verbose thông báo chi tiết; dùng hai lần nếu muốn chi tiết hơn" " -v, --verbose thông báo chi tiết; dùng hai lần nếu muốn chi tiết hơn"
#: src/xz/message.c:1222 #: src/xz/message.c:1223
msgid " -Q, --no-warn make warnings not affect the exit status" msgid " -Q, --no-warn make warnings not affect the exit status"
msgstr "" msgstr " -Q, --no-warn làm cho các cảnh báo không ảnh hưởng đến trạng thái thoát"
" -Q, --no-warn làm cho các cảnh báo không ảnh hưởng đến trạng thái "
"thoát"
#: src/xz/message.c:1224 #: src/xz/message.c:1225
msgid "" msgid " --robot use machine-parsable messages (useful for scripts)"
" --robot use machine-parsable messages (useful for scripts)"
msgstr "" msgstr ""
" --robot dùng các thông điệp máy có thể phân tích\n" " --robot dùng các thông điệp máy có thể phân tích\n"
" (hữu dụng với scripts)" " (hữu dụng với scripts)"
#: src/xz/message.c:1227 #: src/xz/message.c:1228
msgid "" msgid ""
" --info-memory display the total amount of RAM and the currently " " --info-memory display the total amount of RAM and the currently active\n"
"active\n"
" memory usage limits, and exit" " memory usage limits, and exit"
msgstr "" msgstr ""
" --info-memory hiển thị tổng lượng RAM và mức giới hạn tiêu dùng\n" " --info-memory hiển thị tổng lượng RAM và mức giới hạn tiêu dùng\n"
" bộ nhớ hiện tại, rồi thoát" " bộ nhớ hiện tại, rồi thoát"
#: src/xz/message.c:1230 #: src/xz/message.c:1231
msgid "" msgid ""
" -h, --help display the short help (lists only the basic options)\n" " -h, --help display the short help (lists only the basic options)\n"
" -H, --long-help display this long help and exit" " -H, --long-help display this long help and exit"
@ -894,7 +845,7 @@ msgstr ""
" (chỉ liệt kê các tùy chọn cơ bản)\n" " (chỉ liệt kê các tùy chọn cơ bản)\n"
" -H, --long-help hiển thị trợ giúp đầy đủ rồi thoát" " -H, --long-help hiển thị trợ giúp đầy đủ rồi thoát"
#: src/xz/message.c:1234 #: src/xz/message.c:1235
msgid "" msgid ""
" -h, --help display this short help and exit\n" " -h, --help display this short help and exit\n"
" -H, --long-help display the long help (lists also the advanced options)" " -H, --long-help display the long help (lists also the advanced options)"
@ -903,11 +854,11 @@ msgstr ""
" -H, --long-help hiển thị trợ giúp đầy đủ\n" " -H, --long-help hiển thị trợ giúp đầy đủ\n"
" (liệt kê cả những tùy chọn cấp cao)" " (liệt kê cả những tùy chọn cấp cao)"
#: src/xz/message.c:1239 #: src/xz/message.c:1240
msgid " -V, --version display the version number and exit" msgid " -V, --version display the version number and exit"
msgstr " -V, --version hiển thị số phiên bản và thoát" msgstr " -V, --version hiển thị số phiên bản và thoát"
#: src/xz/message.c:1241 #: src/xz/message.c:1242
msgid "" msgid ""
"\n" "\n"
"With no FILE, or when FILE is -, read standard input.\n" "With no FILE, or when FILE is -, read standard input.\n"
@ -919,27 +870,26 @@ msgstr ""
#. for this package. Please add _another line_ saying #. for this package. Please add _another line_ saying
#. "Report translation bugs to <...>\n" with the email or WWW #. "Report translation bugs to <...>\n" with the email or WWW
#. address for translation bugs. Thanks. #. address for translation bugs. Thanks.
#: src/xz/message.c:1247 #: src/xz/message.c:1248
#, c-format #, c-format
msgid "Report bugs to <%s> (in English or Finnish).\n" msgid "Report bugs to <%s> (in English or Finnish).\n"
msgstr "" msgstr ""
"Hãy báo cáo lỗi cho <%s> (bằng tiếng Anh hoặc Phần Lan).\n" "Hãy báo cáo lỗi cho <%s> (bằng tiếng Anh hoặc Phần Lan).\n"
"Thông báo lỗi dịch cho: <http://translationproject.org/team/vi.html>.\n" "Thông báo lỗi dịch cho: <http://translationproject.org/team/vi.html>.\n"
#: src/xz/message.c:1249 #: src/xz/message.c:1250
#, c-format #, c-format
msgid "%s home page: <%s>\n" msgid "%s home page: <%s>\n"
msgstr "Trang chủ %s: <%s>.\n" msgstr "Trang chủ %s: <%s>.\n"
#: src/xz/message.c:1253 #: src/xz/message.c:1254
msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE." msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
msgstr "ĐÂY LÀ PHIÊN BẢN PHÁT TRIỂN VÀ NÓ KHÔNG PHÙ HỢP VỚI MỤC ĐÍCH SẢN XUẤT." msgstr "ĐÂY LÀ PHIÊN BẢN PHÁT TRIỂN VÀ NÓ KHÔNG PHÙ HỢP VỚI MỤC ĐÍCH SẢN XUẤT."
#: src/xz/options.c:86 #: src/xz/options.c:86
#, c-format #, c-format
msgid "%s: Options must be `name=value' pairs separated with commas" msgid "%s: Options must be `name=value' pairs separated with commas"
msgstr "" msgstr "%s: Các tùy chọn phải là các cặp “name=value” ngăn cách nhau bằng dấu phẩy"
"%s: Các tùy chọn phải là các cặp “name=value” ngăn cách nhau bằng dấu phẩy"
#: src/xz/options.c:93 #: src/xz/options.c:93
#, c-format #, c-format
@ -967,11 +917,8 @@ msgstr "Bộ tìm khớp đã chọn yêu cầu mức “tốt” ít nhất là
#: src/xz/suffix.c:133 src/xz/suffix.c:258 #: src/xz/suffix.c:133 src/xz/suffix.c:258
#, c-format #, c-format
msgid "" msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
"%s: With --format=raw, --suffix=.SUF is required unless writing to stdout" msgstr "%s: Nếu --format=raw, --suffix=.SUF sẽ được yêu cầu trừ trường hợp ghi ra đầu ra tiêu chuẩn"
msgstr ""
"%s: Nếu --format=raw, --suffix=.SUF sẽ được yêu cầu trừ trường hợp ghi ra "
"đầu ra tiêu chuẩn"
#: src/xz/suffix.c:164 #: src/xz/suffix.c:164
#, c-format #, c-format
@ -1027,12 +974,16 @@ msgstr "Gặp lỗi khi ghi dữ liệu vào đầu ra tiêu chuẩn"
msgid "Unknown error" msgid "Unknown error"
msgstr "Lỗi chưa biết" msgstr "Lỗi chưa biết"
#~ msgid "Error setting O_NONBLOCK on standard input: %s"
#~ msgstr "Lỗi cài đặt O_NONBLOCK trên đầu vào tiêu chuẩn: %s"
#~ msgid "Error setting O_NONBLOCK on standard output: %s"
#~ msgstr "Lỗi cài đặt O_NONBLOCK trên đầu ra tiêu chuẩn: %s"
#~ msgid "" #~ msgid ""
#~ " --block-size=SIZE\n" #~ " --block-size=SIZE\n"
#~ " when compressing to the .xz format, start a new " #~ " when compressing to the .xz format, start a new block\n"
#~ "block\n" #~ " after every SIZE bytes of input; 0=disabled (default)"
#~ " after every SIZE bytes of input; 0=disabled "
#~ "(default)"
#~ msgstr "" #~ msgstr ""
#~ " --block-size=CỠ\n" #~ " --block-size=CỠ\n"
#~ " khi nén thành định dạng .xz, bắt đầu khối mới\n" #~ " khi nén thành định dạng .xz, bắt đầu khối mới\n"

963
po/zh_CN.po Normal file
View File

@ -0,0 +1,963 @@
# Chinese translations for xz package
# xz 软件包的简体中文翻译。
# This file is put in the public domain.
# Boyuan Yang <073plan@gmail.com>, 2019.
#
msgid ""
msgstr ""
"Project-Id-Version: xz 5.2.4\n"
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
"POT-Creation-Date: 2018-04-29 18:19+0300\n"
"PO-Revision-Date: 2019-03-20 15:25-0400\n"
"Last-Translator: Boyuan Yang <073plan@gmail.com>\n"
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 2.2.1\n"
#: src/xz/args.c:63
#, c-format
msgid "%s: Invalid argument to --block-list"
msgstr "%s--block-list 的无效参数"
#: src/xz/args.c:73
#, c-format
msgid "%s: Too many arguments to --block-list"
msgstr "%s--block-list 得到过多参数"
#: src/xz/args.c:102
msgid "0 can only be used as the last element in --block-list"
msgstr "0 仅可用于 --block-list 的最后一个元素"
#: src/xz/args.c:406
#, c-format
msgid "%s: Unknown file format type"
msgstr "%s位置文件格式类型"
#: src/xz/args.c:429 src/xz/args.c:437
#, c-format
msgid "%s: Unsupported integrity check type"
msgstr "%s不支持的完整性检查类型"
#: src/xz/args.c:473
msgid "Only one file can be specified with `--files' or `--files0'."
msgstr "仅可使用“--files”或“--files0”指定一个文件。"
#: src/xz/args.c:541
#, c-format
msgid "The environment variable %s contains too many arguments"
msgstr "环境变量 %s 包含过多参数"
#: src/xz/args.c:643
msgid "Compression support was disabled at build time"
msgstr "压缩支持已在构建时禁用"
#: src/xz/args.c:650
msgid "Decompression support was disabled at build time"
msgstr "解压支持已在构建时禁用"
#: src/xz/coder.c:110
msgid "Maximum number of filters is four"
msgstr "过滤器最多数量为四"
#: src/xz/coder.c:129
msgid "Memory usage limit is too low for the given filter setup."
msgstr "内存用量限制对指定过滤器设置过低。"
#: src/xz/coder.c:159
msgid "Using a preset in raw mode is discouraged."
msgstr "不推荐在 raw 模式使用预设等级。"
#: src/xz/coder.c:161
msgid "The exact options of the presets may vary between software versions."
msgstr "各个预设等级所使用的准确选项列表在不同软件版本之间可能不同。"
#: src/xz/coder.c:184
msgid "The .lzma format supports only the LZMA1 filter"
msgstr ".lzma 格式只支持 LZMA1 过滤器"
#: src/xz/coder.c:192
msgid "LZMA1 cannot be used with the .xz format"
msgstr "LZMA1 无法用于 .xz 格式"
#: src/xz/coder.c:209
msgid "The filter chain is incompatible with --flush-timeout"
msgstr "过滤器链和 --flush-timeout 不兼容"
#: src/xz/coder.c:215
msgid "Switching to single-threaded mode due to --flush-timeout"
msgstr "因 --flush-timeout 而切换至单线程模式"
#: src/xz/coder.c:235
#, c-format
msgid "Using up to %<PRIu32> threads."
msgstr "使用最多 %<PRIu32> 个线程。"
#: src/xz/coder.c:251
msgid "Unsupported filter chain or filter options"
msgstr "不支持的过滤器链或过滤器选项"
#: src/xz/coder.c:263
#, c-format
msgid "Decompression will need %s MiB of memory."
msgstr "解压缩需要 %s MiB 的内存。"
#: src/xz/coder.c:300
#, c-format
msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
msgstr "已将所使用的线程数从 %s 调整为 %s以不超出 %s MiB 的内存用量限制"
#: src/xz/coder.c:354
#, c-format
msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
msgstr "已调整 LZMA%c 字典大小(从 %s MiB 调整为 %s MiB以不超出 %s MiB 的内存用量限制"
#: src/xz/file_io.c:110 src/xz/file_io.c:118
#, c-format
msgid "Error creating a pipe: %s"
msgstr "创建管道时出错:%s"
#: src/xz/file_io.c:173
msgid "Sandbox is disabled due to incompatible command line arguments"
msgstr "沙盒已因不兼容的命令行参数而禁用"
#: src/xz/file_io.c:216
msgid "Sandbox was successfully enabled"
msgstr "已成功启用沙盒"
#: src/xz/file_io.c:220
msgid "Failed to enable the sandbox"
msgstr "沙盒启用失败"
#: src/xz/file_io.c:262
#, c-format
msgid "%s: poll() failed: %s"
msgstr "%spoll() 失败:%s"
#. TRANSLATORS: When compression or decompression finishes,
#. and xz is going to remove the source file, xz first checks
#. if the source file still exists, and if it does, does its
#. device and inode numbers match what xz saw when it opened
#. the source file. If these checks fail, this message is
#. shown, %s being the filename, and the file is not deleted.
#. The check for device and inode numbers is there, because
#. it is possible that the user has put a new file in place
#. of the original file, and in that case it obviously
#. shouldn't be removed.
#: src/xz/file_io.c:332
#, c-format
msgid "%s: File seems to have been moved, not removing"
msgstr "%s文件似乎已移动不再进行删除操作"
#: src/xz/file_io.c:339 src/xz/file_io.c:878
#, c-format
msgid "%s: Cannot remove: %s"
msgstr "%s无法删除%s"
#: src/xz/file_io.c:364
#, c-format
msgid "%s: Cannot set the file owner: %s"
msgstr "%s无法设置文件所有者%s"
#: src/xz/file_io.c:370
#, c-format
msgid "%s: Cannot set the file group: %s"
msgstr "%s无法设置文件所有组%s"
#: src/xz/file_io.c:389
#, c-format
msgid "%s: Cannot set the file permissions: %s"
msgstr "%s无法设置文件权限%s"
#: src/xz/file_io.c:515
#, c-format
msgid "Error getting the file status flags from standard input: %s"
msgstr "从标准输入获取文件状态标志出错:%s"
#: src/xz/file_io.c:572 src/xz/file_io.c:634
#, c-format
msgid "%s: Is a symbolic link, skipping"
msgstr "%s是符号链接跳过"
#: src/xz/file_io.c:663
#, c-format
msgid "%s: Is a directory, skipping"
msgstr "%s是目录跳过"
#: src/xz/file_io.c:669
#, c-format
msgid "%s: Not a regular file, skipping"
msgstr "%s不是标准文件跳过"
#: src/xz/file_io.c:686
#, c-format
msgid "%s: File has setuid or setgid bit set, skipping"
msgstr "%s文件有设置用户ID或设置组ID标识跳过"
#: src/xz/file_io.c:693
#, c-format
msgid "%s: File has sticky bit set, skipping"
msgstr "%s文件有粘滞位标识跳过"
#: src/xz/file_io.c:700
#, c-format
msgid "%s: Input file has more than one hard link, skipping"
msgstr "%s输入文件有多于一个硬链接跳过"
#: src/xz/file_io.c:788
#, c-format
msgid "Error restoring the status flags to standard input: %s"
msgstr "回复标准输入的状态标志时出错:%s"
#: src/xz/file_io.c:836
#, c-format
msgid "Error getting the file status flags from standard output: %s"
msgstr "获取标准输出的文件状态标志时出错:%s"
#: src/xz/file_io.c:1014
#, c-format
msgid "Error restoring the O_APPEND flag to standard output: %s"
msgstr "恢复标准输出的 O_APPEND 标志时出错:%s"
#: src/xz/file_io.c:1026
#, c-format
msgid "%s: Closing the file failed: %s"
msgstr "%s关闭文件失败%s"
#: src/xz/file_io.c:1062 src/xz/file_io.c:1288
#, c-format
msgid "%s: Seeking failed when trying to create a sparse file: %s"
msgstr "%s尝试创建稀疏文件时 seek 失败:%s"
#: src/xz/file_io.c:1157
#, c-format
msgid "%s: Read error: %s"
msgstr "%s读取错误%s"
#: src/xz/file_io.c:1177
#, c-format
msgid "%s: Error seeking the file: %s"
msgstr "%sseek 文件时出错:%s"
#: src/xz/file_io.c:1187
#, c-format
msgid "%s: Unexpected end of file"
msgstr "%s未预期的文件结束"
#: src/xz/file_io.c:1246
#, c-format
msgid "%s: Write error: %s"
msgstr "%s写入错误%s"
#: src/xz/hardware.c:107
msgid "Disabled"
msgstr "已禁用"
#. TRANSLATORS: Test with "xz --info-memory" to see if
#. the alignment looks nice.
#: src/xz/hardware.c:126
msgid "Total amount of physical memory (RAM): "
msgstr "物理内存RAM总量 "
#: src/xz/hardware.c:128
msgid "Memory usage limit for compression: "
msgstr "用于压缩的内存用量限制: "
#: src/xz/hardware.c:130
msgid "Memory usage limit for decompression: "
msgstr "用于解压缩的内存用量限制: "
#. TRANSLATORS: Indicates that there is no integrity check.
#. This string is used in tables, so the width must not
#. exceed ten columns with a fixed-width font.
#: src/xz/list.c:65
msgid "None"
msgstr "无"
#. TRANSLATORS: Indicates that integrity check name is not known,
#. but the Check ID is known (here 2). This and other "Unknown-N"
#. strings are used in tables, so the width must not exceed ten
#. columns with a fixed-width font. It's OK to omit the dash if
#. you need space for one extra letter, but don't use spaces.
#: src/xz/list.c:72
msgid "Unknown-2"
msgstr "未知-2"
#: src/xz/list.c:73
msgid "Unknown-3"
msgstr "未知-3"
#: src/xz/list.c:75
msgid "Unknown-5"
msgstr "未知-5"
#: src/xz/list.c:76
msgid "Unknown-6"
msgstr "未知-6"
#: src/xz/list.c:77
msgid "Unknown-7"
msgstr "未知-7"
#: src/xz/list.c:78
msgid "Unknown-8"
msgstr "未知-8"
#: src/xz/list.c:79
msgid "Unknown-9"
msgstr "未知-9"
#: src/xz/list.c:81
msgid "Unknown-11"
msgstr "未知-11"
#: src/xz/list.c:82
msgid "Unknown-12"
msgstr "未知-12"
#: src/xz/list.c:83
msgid "Unknown-13"
msgstr "未知-13"
#: src/xz/list.c:84
msgid "Unknown-14"
msgstr "未知-14"
#: src/xz/list.c:85
msgid "Unknown-15"
msgstr "未知-15"
#: src/xz/list.c:153
#, c-format
msgid "%s: File is empty"
msgstr "%s文件为空"
#: src/xz/list.c:158
#, c-format
msgid "%s: Too small to be a valid .xz file"
msgstr "%s过小而不是有效的 .xz 文件"
#. TRANSLATORS: These are column headings. From Strms (Streams)
#. to Ratio, the columns are right aligned. Check and Filename
#. are left aligned. If you need longer words, it's OK to
#. use two lines here. Test with "xz -l foo.xz".
#: src/xz/list.c:677
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
msgstr " 流 块 压缩大小 解压大小 比例 校验 文件名"
#: src/xz/list.c:717
#, c-format
msgid " Streams: %s\n"
msgstr " 流: %s\n"
#: src/xz/list.c:719
#, c-format
msgid " Blocks: %s\n"
msgstr " 块: %s\n"
#: src/xz/list.c:721
#, c-format
msgid " Compressed size: %s\n"
msgstr " 压缩后大小: %s\n"
#: src/xz/list.c:724
#, c-format
msgid " Uncompressed size: %s\n"
msgstr " 解压缩大小: %s\n"
#: src/xz/list.c:727
#, c-format
msgid " Ratio: %s\n"
msgstr " 压缩比: %s\n"
#: src/xz/list.c:729
#, c-format
msgid " Check: %s\n"
msgstr " 校验方式: %s\n"
#: src/xz/list.c:730
#, c-format
msgid " Stream padding: %s\n"
msgstr " 流填充大小: %s\n"
#. TRANSLATORS: The second line is column headings. All except
#. Check are right aligned; Check is left aligned. Test with
#. "xz -lv foo.xz".
#: src/xz/list.c:758
msgid ""
" Streams:\n"
" Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
msgstr ""
" 流:\n"
" 流 块 压缩偏移量 解压偏移量 压缩大小 解压大小 比例 校验 填充"
#. TRANSLATORS: The second line is column headings. All
#. except Check are right aligned; Check is left aligned.
#: src/xz/list.c:813
#, c-format
msgid ""
" Blocks:\n"
" Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
msgstr ""
" 块:\n"
" 流 块 压缩偏移量 解压偏移量 总计大小 解压大小 比例 校验"
#. TRANSLATORS: These are additional column headings
#. for the most verbose listing mode. CheckVal
#. (Check value), Flags, and Filters are left aligned.
#. Header (Block Header Size), CompSize, and MemUsage
#. are right aligned. %*s is replaced with 0-120
#. spaces to make the CheckVal column wide enough.
#. Test with "xz -lvv foo.xz".
#: src/xz/list.c:825
#, c-format
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
msgstr " CheckVal %*s 头部 标记 压缩大小 内存使用 过滤器"
#: src/xz/list.c:903 src/xz/list.c:1078
#, c-format
msgid " Memory needed: %s MiB\n"
msgstr " 所需内存: %s MiB\n"
#: src/xz/list.c:905 src/xz/list.c:1080
#, c-format
msgid " Sizes in headers: %s\n"
msgstr " 头部存放大小: %s\n"
#: src/xz/list.c:906 src/xz/list.c:1081
msgid "Yes"
msgstr "是"
#: src/xz/list.c:906 src/xz/list.c:1081
msgid "No"
msgstr "否"
#: src/xz/list.c:907 src/xz/list.c:1082
#, c-format
msgid " Minimum XZ Utils version: %s\n"
msgstr " 最低 XZ Utils 版本:%s\n"
#. TRANSLATORS: %s is an integer. Only the plural form of this
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
#: src/xz/list.c:1057
#, c-format
msgid "%s file\n"
msgid_plural "%s files\n"
msgstr[0] "%s 文件\n"
#: src/xz/list.c:1070
msgid "Totals:"
msgstr "总计:"
#: src/xz/list.c:1071
#, c-format
msgid " Number of files: %s\n"
msgstr " 文件数量: %s\n"
#: src/xz/list.c:1146
msgid "--list works only on .xz files (--format=xz or --format=auto)"
msgstr "--list 仅适用于 .xz 文件(--format=xz 或 --format=auto"
#: src/xz/list.c:1152
msgid "--list does not support reading from standard input"
msgstr "--list 不支持从标准输入读取"
#: src/xz/main.c:89
#, c-format
msgid "%s: Error reading filenames: %s"
msgstr "%s读取文件名列表时出错%s"
#: src/xz/main.c:96
#, c-format
msgid "%s: Unexpected end of input when reading filenames"
msgstr "%s读取文件名列表时遇到未预期的输入结束"
#: src/xz/main.c:120
#, c-format
msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
msgstr "%s读取文件名列表时获得了空字符您可能想要使用“--files0”而非“--files”"
#: src/xz/main.c:174
msgid "Compression and decompression with --robot are not supported yet."
msgstr "尚不支持带 --robot 的压缩和解压缩。"
#: src/xz/main.c:252
msgid "Cannot read data from standard input when reading filenames from standard input"
msgstr "无法同时从标准输入读取数据和文件名列表"
#. TRANSLATORS: This is the program name in the beginning
#. of the line in messages. Usually it becomes "xz: ".
#. This is a translatable string because French needs
#. a space before a colon.
#: src/xz/message.c:714
#, c-format
msgid "%s: "
msgstr "%s"
#: src/xz/message.c:777 src/xz/message.c:827
msgid "Internal error (bug)"
msgstr "内部错误bug"
#: src/xz/message.c:784
msgid "Cannot establish signal handlers"
msgstr "无法建立信号处理器"
#: src/xz/message.c:793
msgid "No integrity check; not verifying file integrity"
msgstr "无完整性检查;将不验证文件完整性"
#: src/xz/message.c:796
msgid "Unsupported type of integrity check; not verifying file integrity"
msgstr "不支持的完整性检查类型;将不验证文件完整性"
#: src/xz/message.c:803
msgid "Memory usage limit reached"
msgstr "达到内存使用限制"
#: src/xz/message.c:806
msgid "File format not recognized"
msgstr "无法识别文件格式"
#: src/xz/message.c:809
msgid "Unsupported options"
msgstr "不支持的选项"
#: src/xz/message.c:812
msgid "Compressed data is corrupt"
msgstr "压缩数据已损坏"
#: src/xz/message.c:815
msgid "Unexpected end of input"
msgstr "输入意外结束"
#: src/xz/message.c:848
#, c-format
msgid "%s MiB of memory is required. The limiter is disabled."
msgstr "需要 %s MiB 的内存空间。限制已禁用。"
#: src/xz/message.c:876
#, c-format
msgid "%s MiB of memory is required. The limit is %s."
msgstr "需要 %s MiB 的内存空间。限制为 %s。"
#: src/xz/message.c:1043
#, c-format
msgid "%s: Filter chain: %s\n"
msgstr "%s过滤器链%s\n"
#: src/xz/message.c:1053
#, c-format
msgid "Try `%s --help' for more information."
msgstr "请尝试执行“%s --help”来获取更多信息。"
#: src/xz/message.c:1079
#, c-format
msgid ""
"Usage: %s [OPTION]... [FILE]...\n"
"Compress or decompress FILEs in the .xz format.\n"
"\n"
msgstr ""
"用法:%s [选项]... [文件]...\n"
"使用 .xz 格式压缩或解压缩文件。\n"
"\n"
#: src/xz/message.c:1086
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
msgstr "必选参数对长短选项同时适用。\n"
#: src/xz/message.c:1090
msgid " Operation mode:\n"
msgstr " 操作模式:\n"
#: src/xz/message.c:1093
msgid ""
" -z, --compress force compression\n"
" -d, --decompress force decompression\n"
" -t, --test test compressed file integrity\n"
" -l, --list list information about .xz files"
msgstr ""
" -z, --compress 强制压缩\n"
" -d, --decompress 强制解压缩\n"
" -t, --test 测试压缩文件完整性\n"
" -l, --list 列出 .xz 文件的信息"
#: src/xz/message.c:1099
msgid ""
"\n"
" Operation modifiers:\n"
msgstr ""
"\n"
" 操作修饰符:\n"
#: src/xz/message.c:1102
msgid ""
" -k, --keep keep (don't delete) input files\n"
" -f, --force force overwrite of output file and (de)compress links\n"
" -c, --stdout write to standard output and don't delete input files"
msgstr ""
" -k, --keep 保留(不要删除)输入文件\n"
" -f, --force 强制覆写输出文件和(解)压缩链接\n"
" -c, --stdout 向标准输出写入,同时不要删除输入文件"
#: src/xz/message.c:1108
msgid ""
" --single-stream decompress only the first stream, and silently\n"
" ignore possible remaining input data"
msgstr " --single-stream 仅解压缩第一个流,忽略其后可能继续出现的输入数据"
#: src/xz/message.c:1111
msgid ""
" --no-sparse do not create sparse files when decompressing\n"
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
" --files[=FILE] read filenames to process from FILE; if FILE is\n"
" omitted, filenames are read from the standard input;\n"
" filenames must be terminated with the newline character\n"
" --files0[=FILE] like --files but use the null character as terminator"
msgstr ""
" --no-sparse 解压缩时不要创建稀疏文件\n"
" -S, --suffix=.SUF 压缩文件使用指定的“.SUF”后缀名\n"
" --files[=文件] 从指定文件读取要处理的文件名列表;如果省略了指定文件名,\n"
" 将从标准输入读取文件名列表;文件名必须使用换行符分隔\n"
" --files0[=文件] 类似 --files但使用空字符进行分隔"
#: src/xz/message.c:1120
msgid ""
"\n"
" Basic file format and compression options:\n"
msgstr ""
"\n"
" 基本文件格式和压缩选项:\n"
#: src/xz/message.c:1122
msgid ""
" -F, --format=FMT file format to encode or decode; possible values are\n"
" `auto' (default), `xz', `lzma', and `raw'\n"
" -C, --check=CHECK integrity check type: `none' (use with caution),\n"
" `crc32', `crc64' (default), or `sha256'"
msgstr ""
" -F, --format=格式 要编码或解码的文件格式;可能的值包括\n"
" “auto”默认、“xz”、“lzma”和“raw”\n"
" -C, --check=类型 完整性检查类型“none”请谨慎使用、\n"
" “crc32”、“crc64”默认或“sha256”"
#: src/xz/message.c:1127
msgid " --ignore-check don't verify the integrity check when decompressing"
msgstr " --ignore-check 解压缩时不要进行完整性检查验证"
#: src/xz/message.c:1131
msgid ""
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
" decompressor memory usage into account before using 7-9!"
msgstr ""
" -0 ... -9 压缩预设等级;默认为 6使用 7-9 的等级之前,请先考虑\n"
" 压缩和解压缩所需的内存用量!(会占用大量内存空间)"
#: src/xz/message.c:1135
msgid ""
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
" does not affect decompressor memory requirements"
msgstr ""
" -e, --extreme 尝试使用更多 CPU 时间来改进压缩比率;\n"
" 不会影响解压缩的内存需求量"
#: src/xz/message.c:1139
msgid ""
" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
" to use as many threads as there are processor cores"
msgstr ""
" -T, --threads=数量 使用最多指定数量的线程;默认值为 1设置为 0\n"
" 可以使用与处理器内核数量相同的线程数"
#: src/xz/message.c:1144
msgid ""
" --block-size=SIZE\n"
" start a new .xz block after every SIZE bytes of input;\n"
" use this to set the block size for threaded compression"
msgstr ""
" --block-size=块大小\n"
" 输入每读取指定块大小的数据后即开始一个新的 .xz 块;\n"
" 使用该选项可以设置多线程压缩中的块大小"
#: src/xz/message.c:1148
msgid ""
" --block-list=SIZES\n"
" start a new .xz block after the given comma-separated\n"
" intervals of uncompressed data"
msgstr ""
" --block-list=块大小列表\n"
" 在所给出的未压缩数据间隔大小的数据之后开始一个新的\n"
" .xz 块(使用逗号分隔)"
#: src/xz/message.c:1152
msgid ""
" --flush-timeout=TIMEOUT\n"
" when compressing, if more than TIMEOUT milliseconds has\n"
" passed since the previous flush and reading more input\n"
" would block, all pending data is flushed out"
msgstr ""
" --flush-timeout=超时时间\n"
" 进行压缩时,如果从上次刷洗输出之后经过了指定的超时时间\n"
" 且读取更多数据会被阻塞,则刷洗输出所有缓冲数据"
#: src/xz/message.c:1158
#, no-c-format
msgid ""
" --memlimit-compress=LIMIT\n"
" --memlimit-decompress=LIMIT\n"
" -M, --memlimit=LIMIT\n"
" set memory usage limit for compression, decompression,\n"
" or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
msgstr ""
" --memlimit-compress=限制用量\n"
" --memlimit-decompress=限制用量\n"
" -M, --memlimit=限制用量\n"
" 设置压缩、解压缩或者两者共同的内存用量限制;\n"
" 所指定限制量单位为字节,或以百分号 % 结尾表示内存比例,\n"
" 或者指定 0 取软件默认值"
#: src/xz/message.c:1165
msgid ""
" --no-adjust if compression settings exceed the memory usage limit,\n"
" give an error instead of adjusting the settings downwards"
msgstr " --no-adjust 如果压缩设置超出内存用量限制,不调整设置而直接报错"
#: src/xz/message.c:1171
msgid ""
"\n"
" Custom filter chain for compression (alternative for using presets):"
msgstr ""
"\n"
" 用于压缩的自定义过滤器链(不使用预设等级时的备选用法):"
#: src/xz/message.c:1180
msgid ""
"\n"
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
" --lzma2[=OPTS] more of the following options (valid values; default):\n"
" preset=PRE reset options to a preset (0-9[e])\n"
" dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n"
" lc=NUM number of literal context bits (0-4; 3)\n"
" lp=NUM number of literal position bits (0-4; 0)\n"
" pb=NUM number of position bits (0-4; 2)\n"
" mode=MODE compression mode (fast, normal; normal)\n"
" nice=NUM nice length of a match (2-273; 64)\n"
" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n"
" depth=NUM maximum search depth; 0=automatic (default)"
msgstr ""
"\n"
" --lzma1[=选项] LZMA1 或 LZMA2指定选项是用逗号分隔的下列选项的组合\n"
" --lzma2[=选项] 值应当为零或大于零(有效值;默认值):\n"
" preset=PRE 将选项重置为预设配置 (0-9[e])\n"
" dict=数字 字典大小 (4KiB - 1536MiB; 8MiB)\n"
" lc=数字 literal context 位的数量 (0-4; 3)\n"
" lp=数字 literal position 位的数量 (0-4; 0)\n"
" pb=数字 position 位的数量 (0-4; 2)\n"
" mode=模式 压缩模式 (fast, normal; normal)\n"
" nice=数字 匹配的 nice 值 (2-273; 64)\n"
" mf=名称 匹配搜索器 match finder\n"
" (hc3, hc4, bt2, bt3, bt4; bt4)\n"
" depth=数字 最大搜索深度; 0=自动(默认)"
#: src/xz/message.c:1195
msgid ""
"\n"
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
" --arm[=OPTS] ARM BCJ filter (little endian only)\n"
" --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
" --sparc[=OPTS] SPARC BCJ filter\n"
" Valid OPTS for all BCJ filters:\n"
" start=NUM start offset for conversions (default=0)"
msgstr ""
"\n"
" --x86[=选项] x86 BCJ 过滤器32 位和 64 位)\n"
" --powerpc[=选项] PowerPC BCJ 过滤器(仅大端序)\n"
" --ia64[=选项] IA-64 (Itanium安腾) BCJ 过滤器\n"
" --arm[=选项] ARM BCJ 过滤器(仅小端序)\n"
" --armthumb[=选项] ARM-Thumb BCJ 过滤器(仅小端序)\n"
" --sparc[=选项] SPARC BCJ 过滤器\n"
" 所有过滤器可用选项:\n"
" start=数字 转换的起始偏移量(默认=0"
#: src/xz/message.c:1207
msgid ""
"\n"
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
" dist=NUM distance between bytes being subtracted\n"
" from each other (1-256; 1)"
msgstr ""
"\n"
" --delta[=选项] 增量过滤器;有效选项(有效值;默认值):\n"
" dist=NUM 相减的字节之间的距离 (1-256; 1)"
#: src/xz/message.c:1215
msgid ""
"\n"
" Other options:\n"
msgstr ""
"\n"
" 其它选项:\n"
#: src/xz/message.c:1218
msgid ""
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
" -v, --verbose be verbose; specify twice for even more verbose"
msgstr ""
" -q, --quiet 不显示警告信息;指定两次可不显示错误信息\n"
" -v, --verbose 输出详细信息;指定两次可以输出更详细的信息"
#: src/xz/message.c:1223
msgid " -Q, --no-warn make warnings not affect the exit status"
msgstr " -Q, --no-warn 使得警告信息不影响程序退出返回值"
#: src/xz/message.c:1225
msgid " --robot use machine-parsable messages (useful for scripts)"
msgstr " --robot 使用机器可解析的信息(对于脚本有用)"
#: src/xz/message.c:1228
msgid ""
" --info-memory display the total amount of RAM and the currently active\n"
" memory usage limits, and exit"
msgstr " --info-memory 显示 RAM 总量和当前配置的内存用量限制,然后退出"
#: src/xz/message.c:1231
msgid ""
" -h, --help display the short help (lists only the basic options)\n"
" -H, --long-help display this long help and exit"
msgstr ""
" -h, --help 显示短帮助信息(仅列出基本选项)\n"
" -H, --long-help 显示本长帮助信息"
#: src/xz/message.c:1235
msgid ""
" -h, --help display this short help and exit\n"
" -H, --long-help display the long help (lists also the advanced options)"
msgstr ""
" -h, --help 显示本短帮助信息并退出\n"
" -H, --long-help 显示长帮助信息(同时列出高级选项)"
#: src/xz/message.c:1240
msgid " -V, --version display the version number and exit"
msgstr " -V, --version 显示软件版本号并退出"
#: src/xz/message.c:1242
msgid ""
"\n"
"With no FILE, or when FILE is -, read standard input.\n"
msgstr ""
"\n"
"如果没有指定文件,或者文件为\"-\",则从标准输入读取。\n"
#. TRANSLATORS: This message indicates the bug reporting address
#. for this package. Please add _another line_ saying
#. "Report translation bugs to <...>\n" with the email or WWW
#. address for translation bugs. Thanks.
#: src/xz/message.c:1248
#, c-format
msgid "Report bugs to <%s> (in English or Finnish).\n"
msgstr ""
"请使用英文或芬兰语向 <%s> 报告软件错误。\n"
"请使用中文向 TP 简体中文翻译团队 <i18n-zh@googlegroups.com>\n"
"报告软件的简体中文翻译错误。\n"
#: src/xz/message.c:1250
#, c-format
msgid "%s home page: <%s>\n"
msgstr "%s 主页:<%s>\n"
#: src/xz/message.c:1254
msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
msgstr "这是开发版本,不适用于生产环境使用。"
#: src/xz/options.c:86
#, c-format
msgid "%s: Options must be `name=value' pairs separated with commas"
msgstr "%s选项必须按照“名称=值”的格式成对出现,使用半角逗号分隔"
#: src/xz/options.c:93
#, c-format
msgid "%s: Invalid option name"
msgstr "%s无效的选项名称"
#: src/xz/options.c:113
#, c-format
msgid "%s: Invalid option value"
msgstr "%s无效的选项值"
#: src/xz/options.c:247
#, c-format
msgid "Unsupported LZMA1/LZMA2 preset: %s"
msgstr "不支持的 LZMA1/LZMA2 预设等级:%s"
#: src/xz/options.c:355
msgid "The sum of lc and lp must not exceed 4"
msgstr "lc 和 lp 的和必须不大于 4"
#: src/xz/options.c:359
#, c-format
msgid "The selected match finder requires at least nice=%<PRIu32>"
msgstr "所选中的匹配搜索器match finder至少需要 nice=%<PRIu32>"
#: src/xz/suffix.c:133 src/xz/suffix.c:258
#, c-format
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
msgstr "%s在启用 --format-raw 选项时,必须指定 --suffix=.SUF 获知写入至标准输出"
#: src/xz/suffix.c:164
#, c-format
msgid "%s: Filename has an unknown suffix, skipping"
msgstr "%s文件名有未知后缀跳过"
#: src/xz/suffix.c:185
#, c-format
msgid "%s: File already has `%s' suffix, skipping"
msgstr "%s文件已有“%s”后缀名跳过"
#: src/xz/suffix.c:393
#, c-format
msgid "%s: Invalid filename suffix"
msgstr "%s无效的文件名后缀"
#: src/xz/util.c:71
#, c-format
msgid "%s: Value is not a non-negative decimal integer"
msgstr "%s值不是非负十进制整数"
#: src/xz/util.c:113
#, c-format
msgid "%s: Invalid multiplier suffix"
msgstr "%s无效的乘数后缀"
#: src/xz/util.c:115
msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
msgstr "有效的后缀包括“KiB”2^10、“MiB”2^20和“GiB”2^30。"
#: src/xz/util.c:132
#, c-format
msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
msgstr "选项“%s”的值必须位于 [%<PRIu64>, %<PRIu64>] 范围内"
#: src/xz/util.c:257
msgid "Empty filename, skipping"
msgstr "空文件名,跳过"
#: src/xz/util.c:271
msgid "Compressed data cannot be read from a terminal"
msgstr "压缩数据不能从终端读取"
#: src/xz/util.c:284
msgid "Compressed data cannot be written to a terminal"
msgstr "压缩数据不能向终端写入"
#: src/common/tuklib_exit.c:39
msgid "Writing to standard output failed"
msgstr "写入标准输出失败"
#: src/common/tuklib_exit.c:42
msgid "Unknown error"
msgstr "未知错误"

956
po/zh_TW.po Normal file
View File

@ -0,0 +1,956 @@
# Chinese translations for xz package.
# This file is put in the public domain.
#
# pan93412 <pan93412@gmail.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: xz 5.2.4\n"
"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
"POT-Creation-Date: 2018-04-29 18:19+0300\n"
"PO-Revision-Date: 2019-04-23 22:00+0800\n"
"Last-Translator: pan93412 <pan93412@gmail.com>\n"
"Language-Team: Chinese (traditional) <zh-l10n@linux.org.tw>\n"
"Language: zh_TW\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 2.2.1\n"
"X-Poedit-SourceCharset: UTF-8\n"
#: src/xz/args.c:63
#, c-format
msgid "%s: Invalid argument to --block-list"
msgstr "%s傳入 --block-list 的參數無效"
#: src/xz/args.c:73
#, c-format
msgid "%s: Too many arguments to --block-list"
msgstr "%s傳入 --block-list 的參數過多"
#: src/xz/args.c:102
msgid "0 can only be used as the last element in --block-list"
msgstr "0 只能作為 --block-list 的最後一個元素"
#: src/xz/args.c:406
#, c-format
msgid "%s: Unknown file format type"
msgstr "%s未知檔案格式類型"
#: src/xz/args.c:429 src/xz/args.c:437
#, c-format
msgid "%s: Unsupported integrity check type"
msgstr "%s不支援的完整性檢查類型"
#: src/xz/args.c:473
msgid "Only one file can be specified with `--files' or `--files0'."
msgstr "「--files」或「--files0」只能指定一個檔案。"
#: src/xz/args.c:541
#, c-format
msgid "The environment variable %s contains too many arguments"
msgstr "%s 環境變數包含過多參數"
#: src/xz/args.c:643
msgid "Compression support was disabled at build time"
msgstr "已在編譯時停用壓縮支援"
#: src/xz/args.c:650
msgid "Decompression support was disabled at build time"
msgstr "已在編譯時停用解壓縮支援"
#: src/xz/coder.c:110
msgid "Maximum number of filters is four"
msgstr "最多只能指定 4 個篩選器"
#: src/xz/coder.c:129
msgid "Memory usage limit is too low for the given filter setup."
msgstr "記憶體用量限制過低,不足以設定指定的篩選器。"
#: src/xz/coder.c:159
msgid "Using a preset in raw mode is discouraged."
msgstr "不建議在 Raw 模式使用設定檔。"
#: src/xz/coder.c:161
msgid "The exact options of the presets may vary between software versions."
msgstr "設定檔的選項可能因軟體版本而有異。"
#: src/xz/coder.c:184
msgid "The .lzma format supports only the LZMA1 filter"
msgstr ".lzma 格式僅支援 LZMA1 篩選器"
#: src/xz/coder.c:192
msgid "LZMA1 cannot be used with the .xz format"
msgstr "LZMA1 不能與 .xz 格式一同使用"
#: src/xz/coder.c:209
msgid "The filter chain is incompatible with --flush-timeout"
msgstr "篩選鏈不相容 --flush-timeout"
#: src/xz/coder.c:215
msgid "Switching to single-threaded mode due to --flush-timeout"
msgstr "因指定 --flush-timeout因此切換到單執行緒模式"
#: src/xz/coder.c:235
#, c-format
msgid "Using up to %<PRIu32> threads."
msgstr "使用最多 %<PRIu32> 個執行緒。"
#: src/xz/coder.c:251
msgid "Unsupported filter chain or filter options"
msgstr "不支援的篩選鏈或篩選器選項"
#: src/xz/coder.c:263
#, c-format
msgid "Decompression will need %s MiB of memory."
msgstr "解壓縮將需要 %s MiB 的記憶體。"
#: src/xz/coder.c:300
#, c-format
msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
msgstr "已將 %s 個執行緒調整至 %s以不超過記憶體用量的 %s MiB 限制"
#: src/xz/coder.c:354
#, c-format
msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
msgstr "已將 LZMA%c 的字典大小從 %s MiB 調整至 %s MiB以不超過記憶體用量的 %s MiB 限制"
#: src/xz/file_io.c:110 src/xz/file_io.c:118
#, c-format
msgid "Error creating a pipe: %s"
msgstr "建立管線時發生錯誤:%s"
#: src/xz/file_io.c:173
msgid "Sandbox is disabled due to incompatible command line arguments"
msgstr "由於指定不相容的指令列參數,已停用沙盒"
#: src/xz/file_io.c:216
msgid "Sandbox was successfully enabled"
msgstr "已成功啟用沙盒"
#: src/xz/file_io.c:220
msgid "Failed to enable the sandbox"
msgstr "無法啟用沙盒"
#: src/xz/file_io.c:262
#, c-format
msgid "%s: poll() failed: %s"
msgstr "%spoll() 失敗:%s"
#. TRANSLATORS: When compression or decompression finishes,
#. and xz is going to remove the source file, xz first checks
#. if the source file still exists, and if it does, does its
#. device and inode numbers match what xz saw when it opened
#. the source file. If these checks fail, this message is
#. shown, %s being the filename, and the file is not deleted.
#. The check for device and inode numbers is there, because
#. it is possible that the user has put a new file in place
#. of the original file, and in that case it obviously
#. shouldn't be removed.
#: src/xz/file_io.c:332
#, c-format
msgid "%s: File seems to have been moved, not removing"
msgstr "%s檔案似乎已經遷移不移除"
#: src/xz/file_io.c:339 src/xz/file_io.c:878
#, c-format
msgid "%s: Cannot remove: %s"
msgstr "%s無法移除%s"
#: src/xz/file_io.c:364
#, c-format
msgid "%s: Cannot set the file owner: %s"
msgstr "%s無法設定檔案所有者%s"
#: src/xz/file_io.c:370
#, c-format
msgid "%s: Cannot set the file group: %s"
msgstr "%s無法設定檔案群組%s"
#: src/xz/file_io.c:389
#, c-format
msgid "%s: Cannot set the file permissions: %s"
msgstr "%s無法設定檔案權限%s"
#: src/xz/file_io.c:515
#, c-format
msgid "Error getting the file status flags from standard input: %s"
msgstr "從標準輸入取得檔案狀態旗標時發生錯誤:%s"
#: src/xz/file_io.c:572 src/xz/file_io.c:634
#, c-format
msgid "%s: Is a symbolic link, skipping"
msgstr "%s是個符號連結跳過"
#: src/xz/file_io.c:663
#, c-format
msgid "%s: Is a directory, skipping"
msgstr "%s是個目錄跳過"
#: src/xz/file_io.c:669
#, c-format
msgid "%s: Not a regular file, skipping"
msgstr "%s不是一般檔案跳過"
#: src/xz/file_io.c:686
#, c-format
msgid "%s: File has setuid or setgid bit set, skipping"
msgstr "%s檔案已設定 setuid 或 setgid 位元,跳過"
#: src/xz/file_io.c:693
#, c-format
msgid "%s: File has sticky bit set, skipping"
msgstr "%s檔案已設定黏性位元sticky bit跳過"
#: src/xz/file_io.c:700
#, c-format
msgid "%s: Input file has more than one hard link, skipping"
msgstr "%s輸入檔有超過一個實際連結 (hard link),跳過"
#: src/xz/file_io.c:788
#, c-format
msgid "Error restoring the status flags to standard input: %s"
msgstr "將狀態旗標還原到標準輸入時發生錯誤:%s"
#: src/xz/file_io.c:836
#, c-format
msgid "Error getting the file status flags from standard output: %s"
msgstr "從標準輸出取得檔案狀態旗標時發生錯誤:%s"
#: src/xz/file_io.c:1014
#, c-format
msgid "Error restoring the O_APPEND flag to standard output: %s"
msgstr "將 O_APPEND 旗標還原到標準輸出時發生錯誤:%s"
#: src/xz/file_io.c:1026
#, c-format
msgid "%s: Closing the file failed: %s"
msgstr "%s關閉檔案失敗%s"
#: src/xz/file_io.c:1062 src/xz/file_io.c:1288
#, c-format
msgid "%s: Seeking failed when trying to create a sparse file: %s"
msgstr "%s嘗試建立疏鬆檔案時發生搜尋失敗%s"
#: src/xz/file_io.c:1157
#, c-format
msgid "%s: Read error: %s"
msgstr "%s讀取時發生錯誤%s"
#: src/xz/file_io.c:1177
#, c-format
msgid "%s: Error seeking the file: %s"
msgstr "%s搜尋檔案時發生錯誤%s"
#: src/xz/file_io.c:1187
#, c-format
msgid "%s: Unexpected end of file"
msgstr "%s非期望的檔案結尾"
#: src/xz/file_io.c:1246
#, c-format
msgid "%s: Write error: %s"
msgstr "%s寫入時發生錯誤%s"
#: src/xz/hardware.c:107
msgid "Disabled"
msgstr "已停用"
#. TRANSLATORS: Test with "xz --info-memory" to see if
#. the alignment looks nice.
#: src/xz/hardware.c:126
msgid "Total amount of physical memory (RAM): "
msgstr "實體記憶體 (RAM) 總量:"
#: src/xz/hardware.c:128
msgid "Memory usage limit for compression: "
msgstr "壓縮記憶體限制: "
#: src/xz/hardware.c:130
msgid "Memory usage limit for decompression: "
msgstr "解壓縮記憶體限制: "
#. TRANSLATORS: Indicates that there is no integrity check.
#. This string is used in tables, so the width must not
#. exceed ten columns with a fixed-width font.
#: src/xz/list.c:65
msgid "None"
msgstr "無"
#. TRANSLATORS: Indicates that integrity check name is not known,
#. but the Check ID is known (here 2). This and other "Unknown-N"
#. strings are used in tables, so the width must not exceed ten
#. columns with a fixed-width font. It's OK to omit the dash if
#. you need space for one extra letter, but don't use spaces.
#: src/xz/list.c:72
msgid "Unknown-2"
msgstr "未知-2"
#: src/xz/list.c:73
msgid "Unknown-3"
msgstr "未知-3"
#: src/xz/list.c:75
msgid "Unknown-5"
msgstr "未知-5"
#: src/xz/list.c:76
msgid "Unknown-6"
msgstr "未知-6"
#: src/xz/list.c:77
msgid "Unknown-7"
msgstr "未知-7"
#: src/xz/list.c:78
msgid "Unknown-8"
msgstr "未知-8"
#: src/xz/list.c:79
msgid "Unknown-9"
msgstr "未知-9"
#: src/xz/list.c:81
msgid "Unknown-11"
msgstr "未知-11"
#: src/xz/list.c:82
msgid "Unknown-12"
msgstr "未知-12"
#: src/xz/list.c:83
msgid "Unknown-13"
msgstr "未知-13"
#: src/xz/list.c:84
msgid "Unknown-14"
msgstr "未知-14"
#: src/xz/list.c:85
msgid "Unknown-15"
msgstr "未知-15"
#: src/xz/list.c:153
#, c-format
msgid "%s: File is empty"
msgstr "%s檔案是空的"
#: src/xz/list.c:158
#, c-format
msgid "%s: Too small to be a valid .xz file"
msgstr "%s因過小而不認為是個有效 .xz 檔"
#. TRANSLATORS: These are column headings. From Strms (Streams)
#. to Ratio, the columns are right aligned. Check and Filename
#. are left aligned. If you need longer words, it's OK to
#. use two lines here. Test with "xz -l foo.xz".
#: src/xz/list.c:677
msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
msgstr " 串流  區塊    已壓縮    未壓縮  比例 檢驗碼 檔名"
#: src/xz/list.c:717
#, c-format
msgid " Streams: %s\n"
msgstr " 串流:         %s\n"
#: src/xz/list.c:719
#, c-format
msgid " Blocks: %s\n"
msgstr " 區塊:         %s\n"
#: src/xz/list.c:721
#, c-format
msgid " Compressed size: %s\n"
msgstr " 壓縮大小:       %s\n"
#: src/xz/list.c:724
#, c-format
msgid " Uncompressed size: %s\n"
msgstr " 未壓縮大小:      %s\n"
#: src/xz/list.c:727
#, c-format
msgid " Ratio: %s\n"
msgstr " 壓縮比:        %s\n"
#: src/xz/list.c:729
#, c-format
msgid " Check: %s\n"
msgstr " 檢驗碼:        %s\n"
#: src/xz/list.c:730
#, c-format
msgid " Stream padding: %s\n"
msgstr " 串流填充:       %s\n"
# 下方的文字因排版有一些障礙,因此暫時不理他。
#. TRANSLATORS: The second line is column headings. All except
#. Check are right aligned; Check is left aligned. Test with
#. "xz -lv foo.xz".
#: src/xz/list.c:758
msgid ""
" Streams:\n"
" Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
msgstr ""
" 串流:\n"
" Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
# 下方的文字因排版有一些障礙,因此暫時不理他。
#. TRANSLATORS: The second line is column headings. All
#. except Check are right aligned; Check is left aligned.
#: src/xz/list.c:813
#, c-format
msgid ""
" Blocks:\n"
" Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
msgstr ""
" 區塊:\n"
" Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
# 下方的文字因排版有一些障礙,因此暫時不理他。
#. TRANSLATORS: These are additional column headings
#. for the most verbose listing mode. CheckVal
#. (Check value), Flags, and Filters are left aligned.
#. Header (Block Header Size), CompSize, and MemUsage
#. are right aligned. %*s is replaced with 0-120
#. spaces to make the CheckVal column wide enough.
#. Test with "xz -lvv foo.xz".
#: src/xz/list.c:825
#, c-format
msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
msgstr " CheckVal %*s Header Flags CompSize MemUsage Filters"
#: src/xz/list.c:903 src/xz/list.c:1078
#, c-format
msgid " Memory needed: %s MiB\n"
msgstr " 所需記憶體量:     %s MiB\n"
#: src/xz/list.c:905 src/xz/list.c:1080
#, c-format
msgid " Sizes in headers: %s\n"
msgstr " 檔頭中標示大小:    %s\n"
#: src/xz/list.c:906 src/xz/list.c:1081
msgid "Yes"
msgstr "是"
#: src/xz/list.c:906 src/xz/list.c:1081
msgid "No"
msgstr "否"
#: src/xz/list.c:907 src/xz/list.c:1082
#, c-format
msgid " Minimum XZ Utils version: %s\n"
msgstr " 最小 XZ 工具程式版本: %s\n"
#. TRANSLATORS: %s is an integer. Only the plural form of this
#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
#: src/xz/list.c:1057
#, c-format
msgid "%s file\n"
msgid_plural "%s files\n"
msgstr[0] "%s 個檔案\n"
#: src/xz/list.c:1070
msgid "Totals:"
msgstr "總計:"
#: src/xz/list.c:1071
#, c-format
msgid " Number of files: %s\n"
msgstr " 檔案數:        %s\n"
#: src/xz/list.c:1146
msgid "--list works only on .xz files (--format=xz or --format=auto)"
msgstr "--list 只能在 .xz 檔使用(--format=xz 或 --format=auto"
#: src/xz/list.c:1152
msgid "--list does not support reading from standard input"
msgstr "--list 不支援從標準輸入讀取"
#: src/xz/main.c:89
#, c-format
msgid "%s: Error reading filenames: %s"
msgstr "%s讀取檔名時發生錯誤%s"
#: src/xz/main.c:96
#, c-format
msgid "%s: Unexpected end of input when reading filenames"
msgstr "%s讀取檔名時遇到非預期的輸入結尾"
#: src/xz/main.c:120
#, c-format
msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
msgstr "%s讀取檔名時發現空字元或許您想使用「--files0」而非「--files」"
#: src/xz/main.c:174
msgid "Compression and decompression with --robot are not supported yet."
msgstr "尚未支援搭配 --robot 壓縮和解壓縮。"
#: src/xz/main.c:252
msgid "Cannot read data from standard input when reading filenames from standard input"
msgstr "從標準輸入讀取檔名時,無法從標準輸入讀取資料"
#. TRANSLATORS: This is the program name in the beginning
#. of the line in messages. Usually it becomes "xz: ".
#. This is a translatable string because French needs
#. a space before a colon.
#: src/xz/message.c:714
#, c-format
msgid "%s: "
msgstr "%s"
#: src/xz/message.c:777 src/xz/message.c:827
msgid "Internal error (bug)"
msgstr "內部錯誤(臭蟲)"
#: src/xz/message.c:784
msgid "Cannot establish signal handlers"
msgstr "無法確立信號處理器"
#: src/xz/message.c:793
msgid "No integrity check; not verifying file integrity"
msgstr "沒有完整性檢查;不驗證檔案完整性"
#: src/xz/message.c:796
msgid "Unsupported type of integrity check; not verifying file integrity"
msgstr "未知完整性檢查類型;不驗證檔案完整性"
#: src/xz/message.c:803
msgid "Memory usage limit reached"
msgstr "達到記憶體用量上限"
#: src/xz/message.c:806
msgid "File format not recognized"
msgstr "無法識別檔案格式"
#: src/xz/message.c:809
msgid "Unsupported options"
msgstr "不支援的選項"
#: src/xz/message.c:812
msgid "Compressed data is corrupt"
msgstr "壓縮資料是損壞的"
#: src/xz/message.c:815
msgid "Unexpected end of input"
msgstr "遇到非預期輸入結尾"
#: src/xz/message.c:848
#, c-format
msgid "%s MiB of memory is required. The limiter is disabled."
msgstr "需要 %s MiB 的記憶體。已停用記憶體限制器。"
#: src/xz/message.c:876
#, c-format
msgid "%s MiB of memory is required. The limit is %s."
msgstr "需要 %s MiB 的記憶體。記憶體限制為 %s。"
#: src/xz/message.c:1043
#, c-format
msgid "%s: Filter chain: %s\n"
msgstr "%s篩選鏈%s\n"
#: src/xz/message.c:1053
#, c-format
msgid "Try `%s --help' for more information."
msgstr "嘗試「%s --help」取得更多資訊。"
#: src/xz/message.c:1079
#, c-format
msgid ""
"Usage: %s [OPTION]... [FILE]...\n"
"Compress or decompress FILEs in the .xz format.\n"
"\n"
msgstr ""
"用法:%s [選項]... [檔案]...\n"
"用 .xz 格式壓縮,或解壓縮 .xz 格式中的 <檔案>。\n"
"\n"
#: src/xz/message.c:1086
msgid "Mandatory arguments to long options are mandatory for short options too.\n"
msgstr "長選項的必填參數,對短選項也是必填。\n"
#: src/xz/message.c:1090
msgid " Operation mode:\n"
msgstr " 操作模式:\n"
#: src/xz/message.c:1093
msgid ""
" -z, --compress force compression\n"
" -d, --decompress force decompression\n"
" -t, --test test compressed file integrity\n"
" -l, --list list information about .xz files"
msgstr ""
" -z, --compress 強制壓縮\n"
" -d, --decompress 強制解壓縮\n"
" -t, --test 測試壓縮檔完整性\n"
" -l, --list 列出 .xz 檔的資訊"
#: src/xz/message.c:1099
msgid ""
"\n"
" Operation modifiers:\n"
msgstr ""
"\n"
" 操作修飾詞:\n"
#: src/xz/message.c:1102
msgid ""
" -k, --keep keep (don't delete) input files\n"
" -f, --force force overwrite of output file and (de)compress links\n"
" -c, --stdout write to standard output and don't delete input files"
msgstr ""
" -k, --keep 保留(不刪除)輸入檔\n"
" -f, --force 強制覆寫輸出檔並(解)壓縮連結\n"
" -c, --stdout 寫入標準輸出並不刪除輸入檔"
#: src/xz/message.c:1108
msgid ""
" --single-stream decompress only the first stream, and silently\n"
" ignore possible remaining input data"
msgstr ""
" --single-stream 僅解壓縮第一個串流,再\n"
" 安靜地忽略可能剩餘的輸入檔"
#: src/xz/message.c:1111
msgid ""
" --no-sparse do not create sparse files when decompressing\n"
" -S, --suffix=.SUF use the suffix `.SUF' on compressed files\n"
" --files[=FILE] read filenames to process from FILE; if FILE is\n"
" omitted, filenames are read from the standard input;\n"
" filenames must be terminated with the newline character\n"
" --files0[=FILE] like --files but use the null character as terminator"
msgstr ""
" --no-sparse 不在解壓縮時建立疏鬆檔案\n"
" -S, --suffix=.SUF 在壓縮檔加上後綴「.SUF」\n"
" --files[=檔案] 讀取檔案名稱以處理 <檔案>;如省略 <檔案>\n"
" 則從標準輸入讀取檔名;檔名必須以換行字元作為結尾\n"
" --files0[=檔案] 類似 --files 但是以 null 空字元作結尾"
#: src/xz/message.c:1120
msgid ""
"\n"
" Basic file format and compression options:\n"
msgstr ""
"\n"
" 基本檔案格式與壓縮選項:\n"
#: src/xz/message.c:1122
msgid ""
" -F, --format=FMT file format to encode or decode; possible values are\n"
" `auto' (default), `xz', `lzma', and `raw'\n"
" -C, --check=CHECK integrity check type: `none' (use with caution),\n"
" `crc32', `crc64' (default), or `sha256'"
msgstr ""
" -F, --format=格式 用於編碼或解碼的檔案格式;可用的值有:\n"
" 「auto」預設、「xz」、「lzma」及「raw」\n"
" -C, --check=檢查碼 完整性檢查類型「none」請小心使用、「crc32」、\n"
" 「crc64」預設值或「sha256」"
#: src/xz/message.c:1127
msgid " --ignore-check don't verify the integrity check when decompressing"
msgstr " --ignore-check 不在解壓縮時驗證完整性"
#: src/xz/message.c:1131
msgid ""
" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
" decompressor memory usage into account before using 7-9!"
msgstr ""
" -0 ... -9 壓縮設定檔;預設值為 6使用 7-9 前請考慮\n"
" 壓縮和解壓縮所使用的記憶體!"
#: src/xz/message.c:1135
msgid ""
" -e, --extreme try to improve compression ratio by using more CPU time;\n"
" does not affect decompressor memory requirements"
msgstr ""
" -e, --extreme 使用更多 CPU 時間以嘗試改善壓縮比;\n"
" 不影響解壓縮器的記憶體需求"
#: src/xz/message.c:1139
msgid ""
" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
" to use as many threads as there are processor cores"
msgstr ""
" -T, --threads=NUM 使用最多 NUM 個執行緒;預設為 1設成 0 則使用所有的\n"
" 處理機核心"
#: src/xz/message.c:1144
msgid ""
" --block-size=SIZE\n"
" start a new .xz block after every SIZE bytes of input;\n"
" use this to set the block size for threaded compression"
msgstr ""
" --block-size=大小\n"
" 輸入每 <大小> 位元組後,開始一個新 .xz 區塊;\n"
" 使用此功能以設定多執行緒壓縮的區塊大小"
#: src/xz/message.c:1148
msgid ""
" --block-list=SIZES\n"
" start a new .xz block after the given comma-separated\n"
" intervals of uncompressed data"
msgstr ""
#: src/xz/message.c:1152
msgid ""
" --flush-timeout=TIMEOUT\n"
" when compressing, if more than TIMEOUT milliseconds has\n"
" passed since the previous flush and reading more input\n"
" would block, all pending data is flushed out"
msgstr ""
#: src/xz/message.c:1158
#, no-c-format
msgid ""
" --memlimit-compress=LIMIT\n"
" --memlimit-decompress=LIMIT\n"
" -M, --memlimit=LIMIT\n"
" set memory usage limit for compression, decompression,\n"
" or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
msgstr ""
" --memlimit-compress=限制\n"
" --memlimit-decompress=限制\n"
" -M, --memlimit=限制\n"
" 限制壓縮、解壓縮或兩者的記憶體用量上限;\n"
" <限制> 可以是位元組、記憶體百分比 (%)、或 0預設值"
#: src/xz/message.c:1165
msgid ""
" --no-adjust if compression settings exceed the memory usage limit,\n"
" give an error instead of adjusting the settings downwards"
msgstr ""
" --no-adjust 若壓縮設定超過記憶體用量上限,請給出\n"
" 錯誤而非下調設定"
#: src/xz/message.c:1171
msgid ""
"\n"
" Custom filter chain for compression (alternative for using presets):"
msgstr ""
"\n"
" 自訂壓縮篩選鏈(使用設定檔時選用):"
#: src/xz/message.c:1180
msgid ""
"\n"
" --lzma1[=OPTS] LZMA1 or LZMA2; OPTS is a comma-separated list of zero or\n"
" --lzma2[=OPTS] more of the following options (valid values; default):\n"
" preset=PRE reset options to a preset (0-9[e])\n"
" dict=NUM dictionary size (4KiB - 1536MiB; 8MiB)\n"
" lc=NUM number of literal context bits (0-4; 3)\n"
" lp=NUM number of literal position bits (0-4; 0)\n"
" pb=NUM number of position bits (0-4; 2)\n"
" mode=MODE compression mode (fast, normal; normal)\n"
" nice=NUM nice length of a match (2-273; 64)\n"
" mf=NAME match finder (hc3, hc4, bt2, bt3, bt4; bt4)\n"
" depth=NUM maximum search depth; 0=automatic (default)"
msgstr ""
"\n"
" --lzma1[=操作] LZMA1 或 LZMA2<操作> 是以下選項中的 0 個或以上選項\n"
" --lzma2[=操作] (有效值; 預設):\n"
" preset=PRE 將選項重設至某設定檔的選項 (0-9[e])\n"
" dict=NUM 字典大小 (4KiB - 1536MiB; 8MiB)\n"
" lc=NUM 文字內文位元數 (0-4; 3)\n"
" lp=NUM 文字位置位元數 (0-4; 0)\n"
" pb=NUM 位置位元數 (0-4; 2)\n"
" mode=模式 壓縮模式 (fast, normal; normal)\n"
" nice=NUM 符合項目的 nice 長度 (2-273; 64)\n"
" mf=名稱 尋找符合搜尋器 (hc3, hc4, bt2, bt3, bt4; bt4)\n"
" depth=NUM 最大搜尋深度0=自動(預設)"
#: src/xz/message.c:1195
msgid ""
"\n"
" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
" --arm[=OPTS] ARM BCJ filter (little endian only)\n"
" --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
" --sparc[=OPTS] SPARC BCJ filter\n"
" Valid OPTS for all BCJ filters:\n"
" start=NUM start offset for conversions (default=0)"
msgstr ""
"\n"
" --x86[=OPTS] x86 BCJ 篩選器 (32 位元和 64 位元)\n"
" --powerpc[=OPTS] PowerPC BCJ 篩選器(僅大端序)\n"
" --ia64[=OPTS] IA-64 (Itanium) BCJ 篩選器\n"
" --arm[=OPTS] ARM BCJ 篩選器(僅小端序)\n"
" --armthumb[=OPTS] ARM-Thumb BCJ 篩選器(僅小端序)\n"
" --sparc[=OPTS] SPARC BCJ 篩選器\n"
" 所有 BCJ 篩選器可用的 OPTS\n"
" start=NUM 轉換起始位移(預設值=0"
#: src/xz/message.c:1207
msgid ""
"\n"
" --delta[=OPTS] Delta filter; valid OPTS (valid values; default):\n"
" dist=NUM distance between bytes being subtracted\n"
" from each other (1-256; 1)"
msgstr ""
#: src/xz/message.c:1215
msgid ""
"\n"
" Other options:\n"
msgstr ""
"\n"
" 其他選項:\n"
#: src/xz/message.c:1218
msgid ""
" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
" -v, --verbose be verbose; specify twice for even more verbose"
msgstr ""
" -q, --quiet 隱藏警告訊息;指定兩次也一併隱藏錯誤訊息\n"
" -v, --verbose 輸出較詳細內容;指定兩次更詳細輸出"
#: src/xz/message.c:1223
msgid " -Q, --no-warn make warnings not affect the exit status"
msgstr " -Q, --no-warn 即使有警告,退出狀態碼仍不變"
#: src/xz/message.c:1225
msgid " --robot use machine-parsable messages (useful for scripts)"
msgstr " --robot 使用機器可解析訊息(適合用於指令稿)"
#: src/xz/message.c:1228
msgid ""
" --info-memory display the total amount of RAM and the currently active\n"
" memory usage limits, and exit"
msgstr " --info-memory 顯示記憶體總量和使用中的記憶體用量限制後退出"
#: src/xz/message.c:1231
msgid ""
" -h, --help display the short help (lists only the basic options)\n"
" -H, --long-help display this long help and exit"
msgstr ""
" -h, --help 顯示較短說明(僅列出基本選項)\n"
" -H, --long-help 顯示較長說明後退出"
#: src/xz/message.c:1235
msgid ""
" -h, --help display this short help and exit\n"
" -H, --long-help display the long help (lists also the advanced options)"
msgstr ""
" -h, --help 顯示較短說明後退出\n"
" -H, --long-help 顯示較長說明(也列出進階選項)"
#: src/xz/message.c:1240
msgid " -V, --version display the version number and exit"
msgstr " -V, --version 顯示版本號碼後退出"
#: src/xz/message.c:1242
msgid ""
"\n"
"With no FILE, or when FILE is -, read standard input.\n"
msgstr ""
"\n"
"如果未指定 <檔案>,或 <檔案> 是 -,則從標準輸入讀取。\n"
#. TRANSLATORS: This message indicates the bug reporting address
#. for this package. Please add _another line_ saying
#. "Report translation bugs to <...>\n" with the email or WWW
#. address for translation bugs. Thanks.
#: src/xz/message.c:1248
#, c-format
msgid "Report bugs to <%s> (in English or Finnish).\n"
msgstr "請回報臭蟲至 <%s>(使用英文或芬蘭語)。\n"
#: src/xz/message.c:1250
#, c-format
msgid "%s home page: <%s>\n"
msgstr "%s 首頁:<%s>\n"
#: src/xz/message.c:1254
msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
msgstr "此為開發版本,不打算在生產環境使用。"
#: src/xz/options.c:86
#, c-format
msgid "%s: Options must be `name=value' pairs separated with commas"
msgstr "%s選項形式必須為以逗號分隔的「name=value」值對"
#: src/xz/options.c:93
#, c-format
msgid "%s: Invalid option name"
msgstr "%s選項名稱無效"
#: src/xz/options.c:113
#, c-format
msgid "%s: Invalid option value"
msgstr "%s選項值無效"
#: src/xz/options.c:247
#, c-format
msgid "Unsupported LZMA1/LZMA2 preset: %s"
msgstr "不支援的 LZMA1/LZMA2 設定檔:%s"
#: src/xz/options.c:355
msgid "The sum of lc and lp must not exceed 4"
msgstr "lc 和 lp 的總和不能超過 4"
#: src/xz/options.c:359
#, c-format
msgid "The selected match finder requires at least nice=%<PRIu32>"
msgstr "選取的符合搜尋工具需要至少 nice=%<PRIu32>"
#: src/xz/suffix.c:133 src/xz/suffix.c:258
#, c-format
msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
msgstr "%s搭配 --format=raw 時,除非寫入標準輸出,否則需要 --suffix=.SUF"
#: src/xz/suffix.c:164
#, c-format
msgid "%s: Filename has an unknown suffix, skipping"
msgstr "%s檔名有未知後綴跳過"
#: src/xz/suffix.c:185
#, c-format
msgid "%s: File already has `%s' suffix, skipping"
msgstr "%s檔案已有「%s」後綴跳過"
#: src/xz/suffix.c:393
#, c-format
msgid "%s: Invalid filename suffix"
msgstr "%s檔名後綴無效"
#: src/xz/util.c:71
#, c-format
msgid "%s: Value is not a non-negative decimal integer"
msgstr "%s數值不是非負數十進位整數"
#: src/xz/util.c:113
#, c-format
msgid "%s: Invalid multiplier suffix"
msgstr "%s乘數後綴無效"
#: src/xz/util.c:115
msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
msgstr "有效的後綴有「KiB」(2^10)、「MiB」(2^20) 及「GiB」(2^30)。"
#: src/xz/util.c:132
#, c-format
msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
msgstr "選項「%s」的數值必須在 [%<PRIu64>, %<PRIu64>] 範圍內"
#: src/xz/util.c:257
msgid "Empty filename, skipping"
msgstr "空檔名,跳過"
#: src/xz/util.c:271
msgid "Compressed data cannot be read from a terminal"
msgstr "不能從終端機讀入已壓縮資料"
#: src/xz/util.c:284
msgid "Compressed data cannot be written to a terminal"
msgstr "不能將已壓縮資料寫入終端機"
#: src/common/tuklib_exit.c:39
msgid "Writing to standard output failed"
msgstr "寫入標準輸出失敗"
#: src/common/tuklib_exit.c:42
msgid "Unknown error"
msgstr "未知錯誤"

2
po4a/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/man
/xz-man.pot

5532
po4a/de.po Normal file

File diff suppressed because it is too large Load Diff

14
po4a/po4a.conf Normal file
View File

@ -0,0 +1,14 @@
# To add a new language, add it to po4a_langs and run "update-po"
# to get a new .po file. After translating the .po file, run
# "update-po" again to generate the translated man pages.
[po4a_langs] de
[po4a_paths] xz-man.pot $lang:$lang.po
[type: man] ../src/xz/xz.1 $lang:man/$lang/xz.1
[type: man] ../src/xzdec/xzdec.1 $lang:man/$lang/xzdec.1
[type: man] ../src/lzmainfo/lzmainfo.1 $lang:man/$lang/lzmainfo.1
[type: man] ../src/scripts/xzdiff.1 $lang:man/$lang/xzdiff.1
[type: man] ../src/scripts/xzgrep.1 $lang:man/$lang/xzgrep.1
[type: man] ../src/scripts/xzless.1 $lang:man/$lang/xzless.1
[type: man] ../src/scripts/xzmore.1 $lang:man/$lang/xzmore.1

45
po4a/update-po Executable file
View File

@ -0,0 +1,45 @@
#!/bin/sh
#
#############################################################################
#
# Updates xz-man.pot and the *.po files, and generates translated man pages.
# These are done using the program po4a. If po4a is missing, it is still
# possible to build the package without translated man pages.
#
#############################################################################
#
# Author: Lasse Collin
#
# This file has been put into the public domain.
# You can do whatever you want with this file.
#
#############################################################################
if type po4a > /dev/null 2>&1; then
:
else
echo "po4a/update-po: The program 'po4a' was not found." >&2
echo "po4a/update-po: Translated man pages were not generated." >&2
exit 1
fi
if test ! -f po4a.conf; then
cd `dirname "$0"` || exit 1
if test ! -f po4a.conf; then
echo "update-po: Error: Cannot find po4a.conf." >&2
exit 1
fi
fi
PACKAGE_VERSION=`cd .. && sh build-aux/version.sh` || exit 1
# Using --force to get up-to-date version numbers in the output files
# when nothing else has changed. This makes it slower but it's fine
# as long as this isn't run every time when "make" is run at the
# top level directory. (po4a isn't super-fast even without --force).
set -x
po4a --force --verbose \
--package-name="XZ Utils" \
--package-version="$PACKAGE_VERSION" \
--copyright-holder="This file is put in the public domain." \
po4a.conf

View File

@ -17,7 +17,7 @@
#define MY_VERSION LZMA_VERSION_MAJOR,LZMA_VERSION_MINOR,LZMA_VERSION_PATCH,MY_BUILD #define MY_VERSION LZMA_VERSION_MAJOR,LZMA_VERSION_MINOR,LZMA_VERSION_PATCH,MY_BUILD
#define MY_FILENAME MY_NAME MY_SUFFIX #define MY_FILENAME MY_NAME MY_SUFFIX
#define MY_COMPANY "The Tukaani Project <http://tukaani.org/>" #define MY_COMPANY "The Tukaani Project <https://tukaani.org/>"
#define MY_PRODUCT PACKAGE_NAME " <" PACKAGE_URL ">" #define MY_PRODUCT PACKAGE_NAME " <" PACKAGE_URL ">"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

View File

@ -44,9 +44,7 @@
// Some pre-C99 systems have SIZE_MAX in limits.h instead of stdint.h. The // Some pre-C99 systems have SIZE_MAX in limits.h instead of stdint.h. The
// limits are also used to figure out some macros missing from pre-C99 systems. // limits are also used to figure out some macros missing from pre-C99 systems.
#ifdef HAVE_LIMITS_H #include <limits.h>
# include <limits.h>
#endif
// Be more compatible with systems that have non-conforming inttypes.h. // Be more compatible with systems that have non-conforming inttypes.h.
// We assume that int is 32-bit and that long is either 32-bit or 64-bit. // We assume that int is 32-bit and that long is either 32-bit or 64-bit.
@ -153,9 +151,7 @@ typedef unsigned char _Bool;
// string.h should be enough but let's include strings.h and memory.h too if // string.h should be enough but let's include strings.h and memory.h too if
// they exists, since that shouldn't do any harm, but may improve portability. // they exists, since that shouldn't do any harm, but may improve portability.
#ifdef HAVE_STRING_H #include <string.h>
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H #ifdef HAVE_STRINGS_H
# include <strings.h> # include <strings.h>
@ -193,7 +189,8 @@ typedef unsigned char _Bool;
# define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0])) # define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
#endif #endif
#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4 #if defined(__GNUC__) \
&& ((__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4)
# define lzma_attr_alloc_size(x) __attribute__((__alloc_size__(x))) # define lzma_attr_alloc_size(x) __attribute__((__alloc_size__(x)))
#else #else
# define lzma_attr_alloc_size(x) # define lzma_attr_alloc_size(x)

View File

@ -18,6 +18,10 @@
# endif # endif
# include <windows.h> # include <windows.h>
// glibc >= 2.9
#elif defined(TUKLIB_CPUCORES_SCHED_GETAFFINITY)
# include <sched.h>
// FreeBSD // FreeBSD
#elif defined(TUKLIB_CPUCORES_CPUSET) #elif defined(TUKLIB_CPUCORES_CPUSET)
# include <sys/param.h> # include <sys/param.h>
@ -49,12 +53,17 @@ tuklib_cpucores(void)
GetSystemInfo(&sysinfo); GetSystemInfo(&sysinfo);
ret = sysinfo.dwNumberOfProcessors; ret = sysinfo.dwNumberOfProcessors;
#elif defined(TUKLIB_CPUCORES_SCHED_GETAFFINITY)
cpu_set_t cpu_mask;
if (sched_getaffinity(0, sizeof(cpu_mask), &cpu_mask) == 0)
ret = (uint32_t)CPU_COUNT(&cpu_mask);
#elif defined(TUKLIB_CPUCORES_CPUSET) #elif defined(TUKLIB_CPUCORES_CPUSET)
cpuset_t set; cpuset_t set;
if (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, if (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1,
sizeof(set), &set) == 0) { sizeof(set), &set) == 0) {
# ifdef CPU_COUNT # ifdef CPU_COUNT
ret = CPU_COUNT(&set); ret = (uint32_t)CPU_COUNT(&set);
# else # else
for (unsigned i = 0; i < CPU_SETSIZE; ++i) for (unsigned i = 0; i < CPU_SETSIZE; ++i)
if (CPU_ISSET(i, &set)) if (CPU_ISSET(i, &set))
@ -68,7 +77,7 @@ tuklib_cpucores(void)
size_t cpus_size = sizeof(cpus); size_t cpus_size = sizeof(cpus);
if (sysctl(name, 2, &cpus, &cpus_size, NULL, 0) != -1 if (sysctl(name, 2, &cpus, &cpus_size, NULL, 0) != -1
&& cpus_size == sizeof(cpus) && cpus > 0) && cpus_size == sizeof(cpus) && cpus > 0)
ret = cpus; ret = (uint32_t)cpus;
#elif defined(TUKLIB_CPUCORES_SYSCONF) #elif defined(TUKLIB_CPUCORES_SYSCONF)
# ifdef _SC_NPROCESSORS_ONLN # ifdef _SC_NPROCESSORS_ONLN
@ -79,12 +88,12 @@ tuklib_cpucores(void)
const long cpus = sysconf(_SC_NPROC_ONLN); const long cpus = sysconf(_SC_NPROC_ONLN);
# endif # endif
if (cpus > 0) if (cpus > 0)
ret = cpus; ret = (uint32_t)cpus;
#elif defined(TUKLIB_CPUCORES_PSTAT_GETDYNAMIC) #elif defined(TUKLIB_CPUCORES_PSTAT_GETDYNAMIC)
struct pst_dynamic pst; struct pst_dynamic pst;
if (pstat_getdynamic(&pst, sizeof(pst), 1, 0) != -1) if (pstat_getdynamic(&pst, sizeof(pst), 1, 0) != -1)
ret = pst.psd_proc_cnt; ret = (uint32_t)pst.psd_proc_cnt;
#endif #endif
return ret; return ret;

View File

@ -14,6 +14,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h>
#include "tuklib_gettext.h" #include "tuklib_gettext.h"
#include "tuklib_progname.h" #include "tuklib_progname.h"

View File

@ -6,22 +6,26 @@
/// This file provides macros or functions to do some basic integer and bit /// This file provides macros or functions to do some basic integer and bit
/// operations. /// operations.
/// ///
/// Endianness related integer operations (XX = 16, 32, or 64; Y = b or l): /// Native endian inline functions (XX = 16, 32, or 64):
/// - Unaligned native endian reads: readXXne(ptr)
/// - Unaligned native endian writes: writeXXne(ptr, num)
/// - Aligned native endian reads: aligned_readXXne(ptr)
/// - Aligned native endian writes: aligned_writeXXne(ptr, num)
///
/// Endianness-converting integer operations (these can be macros!)
/// (XX = 16, 32, or 64; Y = b or l):
/// - Byte swapping: bswapXX(num) /// - Byte swapping: bswapXX(num)
/// - Byte order conversions to/from native: convXXYe(num) /// - Byte order conversions to/from native (byteswaps if Y isn't
/// - Aligned reads: readXXYe(ptr) /// the native endianness): convXXYe(num)
/// - Aligned writes: writeXXYe(ptr, num) /// - Unaligned reads (16/32-bit only): readXXYe(ptr)
/// - Unaligned reads (16/32-bit only): unaligned_readXXYe(ptr) /// - Unaligned writes (16/32-bit only): writeXXYe(ptr, num)
/// - Unaligned writes (16/32-bit only): unaligned_writeXXYe(ptr, num) /// - Aligned reads: aligned_readXXYe(ptr)
/// - Aligned writes: aligned_writeXXYe(ptr, num)
/// ///
/// Since they can macros, the arguments should have no side effects since /// Since the above can macros, the arguments should have no side effects
/// they may be evaluated more than once. /// because they may be evaluated more than once.
/// ///
/// \todo PowerPC and possibly some other architectures support /// Bit scan operations for non-zero 32-bit integers (inline functions):
/// byte swapping load and store instructions. This file
/// doesn't take advantage of those instructions.
///
/// Bit scan operations for non-zero 32-bit integers:
/// - Bit scan reverse (find highest non-zero bit): bsr32(num) /// - Bit scan reverse (find highest non-zero bit): bsr32(num)
/// - Count leading zeros: clz32(num) /// - Count leading zeros: clz32(num)
/// - Count trailing zeros: ctz32(num) /// - Count trailing zeros: ctz32(num)
@ -42,13 +46,26 @@
#define TUKLIB_INTEGER_H #define TUKLIB_INTEGER_H
#include "tuklib_common.h" #include "tuklib_common.h"
#include <string.h>
// Newer Intel C compilers require immintrin.h for _bit_scan_reverse()
// and such functions.
#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500)
# include <immintrin.h>
#endif
//////////////////////////////////////// ///////////////////
// Operating system specific features // // Byte swapping //
//////////////////////////////////////// ///////////////////
#if defined(HAVE_BYTESWAP_H) #if defined(HAVE___BUILTIN_BSWAPXX)
// GCC >= 4.8 and Clang
# define bswap16(n) __builtin_bswap16(n)
# define bswap32(n) __builtin_bswap32(n)
# define bswap64(n) __builtin_bswap64(n)
#elif defined(HAVE_BYTESWAP_H)
// glibc, uClibc, dietlibc // glibc, uClibc, dietlibc
# include <byteswap.h> # include <byteswap.h>
# ifdef HAVE_BSWAP_16 # ifdef HAVE_BSWAP_16
@ -97,34 +114,33 @@
# endif # endif
#endif #endif
///////////////////
// Byte swapping //
///////////////////
#ifndef bswap16 #ifndef bswap16
# define bswap16(num) \ # define bswap16(n) (uint16_t)( \
(((uint16_t)(num) << 8) | ((uint16_t)(num) >> 8)) (((n) & 0x00FFU) << 8) \
| (((n) & 0xFF00U) >> 8) \
)
#endif #endif
#ifndef bswap32 #ifndef bswap32
# define bswap32(num) \ # define bswap32(n) (uint32_t)( \
( (((uint32_t)(num) << 24) ) \ (((n) & UINT32_C(0x000000FF)) << 24) \
| (((uint32_t)(num) << 8) & UINT32_C(0x00FF0000)) \ | (((n) & UINT32_C(0x0000FF00)) << 8) \
| (((uint32_t)(num) >> 8) & UINT32_C(0x0000FF00)) \ | (((n) & UINT32_C(0x00FF0000)) >> 8) \
| (((uint32_t)(num) >> 24) ) ) | (((n) & UINT32_C(0xFF000000)) >> 24) \
)
#endif #endif
#ifndef bswap64 #ifndef bswap64
# define bswap64(num) \ # define bswap64(n) (uint64_t)( \
( (((uint64_t)(num) << 56) ) \ (((n) & UINT64_C(0x00000000000000FF)) << 56) \
| (((uint64_t)(num) << 40) & UINT64_C(0x00FF000000000000)) \ | (((n) & UINT64_C(0x000000000000FF00)) << 40) \
| (((uint64_t)(num) << 24) & UINT64_C(0x0000FF0000000000)) \ | (((n) & UINT64_C(0x0000000000FF0000)) << 24) \
| (((uint64_t)(num) << 8) & UINT64_C(0x000000FF00000000)) \ | (((n) & UINT64_C(0x00000000FF000000)) << 8) \
| (((uint64_t)(num) >> 8) & UINT64_C(0x00000000FF000000)) \ | (((n) & UINT64_C(0x000000FF00000000)) >> 8) \
| (((uint64_t)(num) >> 24) & UINT64_C(0x0000000000FF0000)) \ | (((n) & UINT64_C(0x0000FF0000000000)) >> 24) \
| (((uint64_t)(num) >> 40) & UINT64_C(0x000000000000FF00)) \ | (((n) & UINT64_C(0x00FF000000000000)) >> 40) \
| (((uint64_t)(num) >> 56) ) ) | (((n) & UINT64_C(0xFF00000000000000)) >> 56) \
)
#endif #endif
// Define conversion macros using the basic byte swapping macros. // Define conversion macros using the basic byte swapping macros.
@ -169,76 +185,76 @@
#endif #endif
////////////////////////////// ////////////////////////////////
// Aligned reads and writes // // Unaligned reads and writes //
////////////////////////////// ////////////////////////////////
// The traditional way of casting e.g. *(const uint16_t *)uint8_pointer
// is bad even if the uint8_pointer is properly aligned because this kind
// of casts break strict aliasing rules and result in undefined behavior.
// With unaligned pointers it's even worse: compilers may emit vector
// instructions that require aligned pointers even if non-vector
// instructions work with unaligned pointers.
//
// Using memcpy() is the standard compliant way to do unaligned access.
// Many modern compilers inline it so there is no function call overhead.
// For those compilers that don't handle the memcpy() method well, the
// old casting method (that violates strict aliasing) can be requested at
// build time. A third method, casting to a packed struct, would also be
// an option but isn't provided to keep things simpler (it's already a mess).
// Hopefully this is flexible enough in practice.
static inline uint16_t static inline uint16_t
read16be(const uint8_t *buf) read16ne(const uint8_t *buf)
{ {
uint16_t num = *(const uint16_t *)buf; #if defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
return conv16be(num); && defined(TUKLIB_USE_UNSAFE_TYPE_PUNNING)
} return *(const uint16_t *)buf;
#else
uint16_t num;
static inline uint16_t memcpy(&num, buf, sizeof(num));
read16le(const uint8_t *buf) return num;
{ #endif
uint16_t num = *(const uint16_t *)buf;
return conv16le(num);
} }
static inline uint32_t static inline uint32_t
read32be(const uint8_t *buf) read32ne(const uint8_t *buf)
{ {
uint32_t num = *(const uint32_t *)buf; #if defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
return conv32be(num); && defined(TUKLIB_USE_UNSAFE_TYPE_PUNNING)
} return *(const uint32_t *)buf;
#else
uint32_t num;
static inline uint32_t memcpy(&num, buf, sizeof(num));
read32le(const uint8_t *buf) return num;
{ #endif
uint32_t num = *(const uint32_t *)buf;
return conv32le(num);
} }
static inline uint64_t static inline uint64_t
read64be(const uint8_t *buf) read64ne(const uint8_t *buf)
{ {
uint64_t num = *(const uint64_t *)buf; #if defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
return conv64be(num); && defined(TUKLIB_USE_UNSAFE_TYPE_PUNNING)
return *(const uint64_t *)buf;
#else
uint64_t num;
memcpy(&num, buf, sizeof(num));
return num;
#endif
} }
static inline uint64_t
read64le(const uint8_t *buf)
{
uint64_t num = *(const uint64_t *)buf;
return conv64le(num);
}
// NOTE: Possible byte swapping must be done in a macro to allow GCC
// to optimize byte swapping of constants when using glibc's or *BSD's
// byte swapping macros. The actual write is done in an inline function
// to make type checking of the buf pointer possible similarly to readXXYe()
// functions.
#define write16be(buf, num) write16ne((buf), conv16be(num))
#define write16le(buf, num) write16ne((buf), conv16le(num))
#define write32be(buf, num) write32ne((buf), conv32be(num))
#define write32le(buf, num) write32ne((buf), conv32le(num))
#define write64be(buf, num) write64ne((buf), conv64be(num))
#define write64le(buf, num) write64ne((buf), conv64le(num))
static inline void static inline void
write16ne(uint8_t *buf, uint16_t num) write16ne(uint8_t *buf, uint16_t num)
{ {
#if defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
&& defined(TUKLIB_USE_UNSAFE_TYPE_PUNNING)
*(uint16_t *)buf = num; *(uint16_t *)buf = num;
#else
memcpy(buf, &num, sizeof(num));
#endif
return; return;
} }
@ -246,7 +262,12 @@ write16ne(uint8_t *buf, uint16_t num)
static inline void static inline void
write32ne(uint8_t *buf, uint32_t num) write32ne(uint8_t *buf, uint32_t num)
{ {
#if defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
&& defined(TUKLIB_USE_UNSAFE_TYPE_PUNNING)
*(uint32_t *)buf = num; *(uint32_t *)buf = num;
#else
memcpy(buf, &num, sizeof(num));
#endif
return; return;
} }
@ -254,90 +275,114 @@ write32ne(uint8_t *buf, uint32_t num)
static inline void static inline void
write64ne(uint8_t *buf, uint64_t num) write64ne(uint8_t *buf, uint64_t num)
{ {
#if defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
&& defined(TUKLIB_USE_UNSAFE_TYPE_PUNNING)
*(uint64_t *)buf = num; *(uint64_t *)buf = num;
#else
memcpy(buf, &num, sizeof(num));
#endif
return; return;
} }
////////////////////////////////
// Unaligned reads and writes //
////////////////////////////////
// NOTE: TUKLIB_FAST_UNALIGNED_ACCESS indicates only support for 16-bit and
// 32-bit unaligned integer loads and stores. It's possible that 64-bit
// unaligned access doesn't work or is slower than byte-by-byte access.
// Since unaligned 64-bit is probably not needed as often as 16-bit or
// 32-bit, we simply don't support 64-bit unaligned access for now.
#ifdef TUKLIB_FAST_UNALIGNED_ACCESS
# define unaligned_read16be read16be
# define unaligned_read16le read16le
# define unaligned_read32be read32be
# define unaligned_read32le read32le
# define unaligned_write16be write16be
# define unaligned_write16le write16le
# define unaligned_write32be write32be
# define unaligned_write32le write32le
#else
static inline uint16_t static inline uint16_t
unaligned_read16be(const uint8_t *buf) read16be(const uint8_t *buf)
{ {
#if defined(WORDS_BIGENDIAN) || defined(TUKLIB_FAST_UNALIGNED_ACCESS)
uint16_t num = read16ne(buf);
return conv16be(num);
#else
uint16_t num = ((uint16_t)buf[0] << 8) | (uint16_t)buf[1]; uint16_t num = ((uint16_t)buf[0] << 8) | (uint16_t)buf[1];
return num; return num;
#endif
} }
static inline uint16_t static inline uint16_t
unaligned_read16le(const uint8_t *buf) read16le(const uint8_t *buf)
{ {
#if !defined(WORDS_BIGENDIAN) || defined(TUKLIB_FAST_UNALIGNED_ACCESS)
uint16_t num = read16ne(buf);
return conv16le(num);
#else
uint16_t num = ((uint16_t)buf[0]) | ((uint16_t)buf[1] << 8); uint16_t num = ((uint16_t)buf[0]) | ((uint16_t)buf[1] << 8);
return num; return num;
#endif
} }
static inline uint32_t static inline uint32_t
unaligned_read32be(const uint8_t *buf) read32be(const uint8_t *buf)
{ {
#if defined(WORDS_BIGENDIAN) || defined(TUKLIB_FAST_UNALIGNED_ACCESS)
uint32_t num = read32ne(buf);
return conv32be(num);
#else
uint32_t num = (uint32_t)buf[0] << 24; uint32_t num = (uint32_t)buf[0] << 24;
num |= (uint32_t)buf[1] << 16; num |= (uint32_t)buf[1] << 16;
num |= (uint32_t)buf[2] << 8; num |= (uint32_t)buf[2] << 8;
num |= (uint32_t)buf[3]; num |= (uint32_t)buf[3];
return num; return num;
#endif
} }
static inline uint32_t static inline uint32_t
unaligned_read32le(const uint8_t *buf) read32le(const uint8_t *buf)
{ {
#if !defined(WORDS_BIGENDIAN) || defined(TUKLIB_FAST_UNALIGNED_ACCESS)
uint32_t num = read32ne(buf);
return conv32le(num);
#else
uint32_t num = (uint32_t)buf[0]; uint32_t num = (uint32_t)buf[0];
num |= (uint32_t)buf[1] << 8; num |= (uint32_t)buf[1] << 8;
num |= (uint32_t)buf[2] << 16; num |= (uint32_t)buf[2] << 16;
num |= (uint32_t)buf[3] << 24; num |= (uint32_t)buf[3] << 24;
return num; return num;
#endif
} }
// NOTE: Possible byte swapping must be done in a macro to allow the compiler
// to optimize byte swapping of constants when using glibc's or *BSD's
// byte swapping macros. The actual write is done in an inline function
// to make type checking of the buf pointer possible.
#if defined(WORDS_BIGENDIAN) || defined(TUKLIB_FAST_UNALIGNED_ACCESS)
# define write16be(buf, num) write16ne(buf, conv16be(num))
# define write32be(buf, num) write32ne(buf, conv32be(num))
#endif
#if !defined(WORDS_BIGENDIAN) || defined(TUKLIB_FAST_UNALIGNED_ACCESS)
# define write16le(buf, num) write16ne(buf, conv16le(num))
# define write32le(buf, num) write32ne(buf, conv32le(num))
#endif
#ifndef write16be
static inline void static inline void
unaligned_write16be(uint8_t *buf, uint16_t num) write16be(uint8_t *buf, uint16_t num)
{ {
buf[0] = (uint8_t)(num >> 8); buf[0] = (uint8_t)(num >> 8);
buf[1] = (uint8_t)num; buf[1] = (uint8_t)num;
return; return;
} }
#endif
#ifndef write16le
static inline void static inline void
unaligned_write16le(uint8_t *buf, uint16_t num) write16le(uint8_t *buf, uint16_t num)
{ {
buf[0] = (uint8_t)num; buf[0] = (uint8_t)num;
buf[1] = (uint8_t)(num >> 8); buf[1] = (uint8_t)(num >> 8);
return; return;
} }
#endif
#ifndef write32be
static inline void static inline void
unaligned_write32be(uint8_t *buf, uint32_t num) write32be(uint8_t *buf, uint32_t num)
{ {
buf[0] = (uint8_t)(num >> 24); buf[0] = (uint8_t)(num >> 24);
buf[1] = (uint8_t)(num >> 16); buf[1] = (uint8_t)(num >> 16);
@ -345,10 +390,12 @@ unaligned_write32be(uint8_t *buf, uint32_t num)
buf[3] = (uint8_t)num; buf[3] = (uint8_t)num;
return; return;
} }
#endif
#ifndef write32le
static inline void static inline void
unaligned_write32le(uint8_t *buf, uint32_t num) write32le(uint8_t *buf, uint32_t num)
{ {
buf[0] = (uint8_t)num; buf[0] = (uint8_t)num;
buf[1] = (uint8_t)(num >> 8); buf[1] = (uint8_t)(num >> 8);
@ -356,10 +403,184 @@ unaligned_write32le(uint8_t *buf, uint32_t num)
buf[3] = (uint8_t)(num >> 24); buf[3] = (uint8_t)(num >> 24);
return; return;
} }
#endif #endif
//////////////////////////////
// Aligned reads and writes //
//////////////////////////////
// Separate functions for aligned reads and writes are provided since on
// strict-align archs aligned access is much faster than unaligned access.
//
// Just like in the unaligned case, memcpy() is needed to avoid
// strict aliasing violations. However, on archs that don't support
// unaligned access the compiler cannot know that the pointers given
// to memcpy() are aligned which results in slow code. As of C11 there is
// no standard way to tell the compiler that we know that the address is
// aligned but some compilers have language extensions to do that. With
// such language extensions the memcpy() method gives excellent results.
//
// What to do on a strict-align system when no known language extentensions
// are available? Falling back to byte-by-byte access would be safe but ruin
// optimizations that have been made specifically with aligned access in mind.
// As a compromise, aligned reads will fall back to non-compliant type punning
// but aligned writes will be byte-by-byte, that is, fast reads are preferred
// over fast writes. This obviously isn't great but hopefully it's a working
// compromise for now.
//
// __builtin_assume_aligned is support by GCC >= 4.7 and clang >= 3.6.
#ifdef HAVE___BUILTIN_ASSUME_ALIGNED
# define tuklib_memcpy_aligned(dest, src, size) \
memcpy(dest, __builtin_assume_aligned(src, size), size)
#else
# define tuklib_memcpy_aligned(dest, src, size) \
memcpy(dest, src, size)
# ifndef TUKLIB_FAST_UNALIGNED_ACCESS
# define TUKLIB_USE_UNSAFE_ALIGNED_READS 1
# endif
#endif
static inline uint16_t
aligned_read16ne(const uint8_t *buf)
{
#if defined(TUKLIB_USE_UNSAFE_TYPE_PUNNING) \
|| defined(TUKLIB_USE_UNSAFE_ALIGNED_READS)
return *(const uint16_t *)buf;
#else
uint16_t num;
tuklib_memcpy_aligned(&num, buf, sizeof(num));
return num;
#endif
}
static inline uint32_t
aligned_read32ne(const uint8_t *buf)
{
#if defined(TUKLIB_USE_UNSAFE_TYPE_PUNNING) \
|| defined(TUKLIB_USE_UNSAFE_ALIGNED_READS)
return *(const uint32_t *)buf;
#else
uint32_t num;
tuklib_memcpy_aligned(&num, buf, sizeof(num));
return num;
#endif
}
static inline uint64_t
aligned_read64ne(const uint8_t *buf)
{
#if defined(TUKLIB_USE_UNSAFE_TYPE_PUNNING) \
|| defined(TUKLIB_USE_UNSAFE_ALIGNED_READS)
return *(const uint64_t *)buf;
#else
uint64_t num;
tuklib_memcpy_aligned(&num, buf, sizeof(num));
return num;
#endif
}
static inline void
aligned_write16ne(uint8_t *buf, uint16_t num)
{
#ifdef TUKLIB_USE_UNSAFE_TYPE_PUNNING
*(uint16_t *)buf = num;
#else
tuklib_memcpy_aligned(buf, &num, sizeof(num));
#endif
return;
}
static inline void
aligned_write32ne(uint8_t *buf, uint32_t num)
{
#ifdef TUKLIB_USE_UNSAFE_TYPE_PUNNING
*(uint32_t *)buf = num;
#else
tuklib_memcpy_aligned(buf, &num, sizeof(num));
#endif
return;
}
static inline void
aligned_write64ne(uint8_t *buf, uint64_t num)
{
#ifdef TUKLIB_USE_UNSAFE_TYPE_PUNNING
*(uint64_t *)buf = num;
#else
tuklib_memcpy_aligned(buf, &num, sizeof(num));
#endif
return;
}
static inline uint16_t
aligned_read16be(const uint8_t *buf)
{
uint16_t num = aligned_read16ne(buf);
return conv16be(num);
}
static inline uint16_t
aligned_read16le(const uint8_t *buf)
{
uint16_t num = aligned_read16ne(buf);
return conv16le(num);
}
static inline uint32_t
aligned_read32be(const uint8_t *buf)
{
uint32_t num = aligned_read32ne(buf);
return conv32be(num);
}
static inline uint32_t
aligned_read32le(const uint8_t *buf)
{
uint32_t num = aligned_read32ne(buf);
return conv32le(num);
}
static inline uint64_t
aligned_read64be(const uint8_t *buf)
{
uint64_t num = aligned_read64ne(buf);
return conv64be(num);
}
static inline uint64_t
aligned_read64le(const uint8_t *buf)
{
uint64_t num = aligned_read64ne(buf);
return conv64le(num);
}
// These need to be macros like in the unaligned case.
#define aligned_write16be(buf, num) aligned_write16ne((buf), conv16be(num))
#define aligned_write16le(buf, num) aligned_write16ne((buf), conv16le(num))
#define aligned_write32be(buf, num) aligned_write32ne((buf), conv32be(num))
#define aligned_write32le(buf, num) aligned_write32ne((buf), conv32le(num))
#define aligned_write64be(buf, num) aligned_write64ne((buf), conv64be(num))
#define aligned_write64le(buf, num) aligned_write64ne((buf), conv64le(num))
////////////////////
// Bit operations //
////////////////////
static inline uint32_t static inline uint32_t
bsr32(uint32_t n) bsr32(uint32_t n)
{ {
@ -372,44 +593,42 @@ bsr32(uint32_t n)
// multiple architectures. On x86, __builtin_clz() ^ 31U becomes // multiple architectures. On x86, __builtin_clz() ^ 31U becomes
// either plain BSR (so the XOR gets optimized away) or LZCNT and // either plain BSR (so the XOR gets optimized away) or LZCNT and
// XOR (if -march indicates that SSE4a instructions are supported). // XOR (if -march indicates that SSE4a instructions are supported).
return __builtin_clz(n) ^ 31U; return (uint32_t)__builtin_clz(n) ^ 31U;
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
uint32_t i; uint32_t i;
__asm__("bsrl %1, %0" : "=r" (i) : "rm" (n)); __asm__("bsrl %1, %0" : "=r" (i) : "rm" (n));
return i; return i;
#elif defined(_MSC_VER) && _MSC_VER >= 1400 #elif defined(_MSC_VER)
// MSVC isn't supported by tuklib, but since this code exists, unsigned long i;
// it doesn't hurt to have it here anyway. _BitScanReverse(&i, n);
uint32_t i;
_BitScanReverse((DWORD *)&i, n);
return i; return i;
#else #else
uint32_t i = 31; uint32_t i = 31;
if ((n & UINT32_C(0xFFFF0000)) == 0) { if ((n & 0xFFFF0000) == 0) {
n <<= 16; n <<= 16;
i = 15; i = 15;
} }
if ((n & UINT32_C(0xFF000000)) == 0) { if ((n & 0xFF000000) == 0) {
n <<= 8; n <<= 8;
i -= 8; i -= 8;
} }
if ((n & UINT32_C(0xF0000000)) == 0) { if ((n & 0xF0000000) == 0) {
n <<= 4; n <<= 4;
i -= 4; i -= 4;
} }
if ((n & UINT32_C(0xC0000000)) == 0) { if ((n & 0xC0000000) == 0) {
n <<= 2; n <<= 2;
i -= 2; i -= 2;
} }
if ((n & UINT32_C(0x80000000)) == 0) if ((n & 0x80000000) == 0)
--i; --i;
return i; return i;
@ -424,7 +643,7 @@ clz32(uint32_t n)
return _bit_scan_reverse(n) ^ 31U; return _bit_scan_reverse(n) ^ 31U;
#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX == UINT32_MAX #elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX == UINT32_MAX
return __builtin_clz(n); return (uint32_t)__builtin_clz(n);
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
uint32_t i; uint32_t i;
@ -433,35 +652,35 @@ clz32(uint32_t n)
: "=r" (i) : "rm" (n)); : "=r" (i) : "rm" (n));
return i; return i;
#elif defined(_MSC_VER) && _MSC_VER >= 1400 #elif defined(_MSC_VER)
uint32_t i; unsigned long i;
_BitScanReverse((DWORD *)&i, n); _BitScanReverse(&i, n);
return i ^ 31U; return i ^ 31U;
#else #else
uint32_t i = 0; uint32_t i = 0;
if ((n & UINT32_C(0xFFFF0000)) == 0) { if ((n & 0xFFFF0000) == 0) {
n <<= 16; n <<= 16;
i = 16; i = 16;
} }
if ((n & UINT32_C(0xFF000000)) == 0) { if ((n & 0xFF000000) == 0) {
n <<= 8; n <<= 8;
i += 8; i += 8;
} }
if ((n & UINT32_C(0xF0000000)) == 0) { if ((n & 0xF0000000) == 0) {
n <<= 4; n <<= 4;
i += 4; i += 4;
} }
if ((n & UINT32_C(0xC0000000)) == 0) { if ((n & 0xC0000000) == 0) {
n <<= 2; n <<= 2;
i += 2; i += 2;
} }
if ((n & UINT32_C(0x80000000)) == 0) if ((n & 0x80000000) == 0)
++i; ++i;
return i; return i;
@ -476,42 +695,42 @@ ctz32(uint32_t n)
return _bit_scan_forward(n); return _bit_scan_forward(n);
#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX >= UINT32_MAX #elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX >= UINT32_MAX
return __builtin_ctz(n); return (uint32_t)__builtin_ctz(n);
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
uint32_t i; uint32_t i;
__asm__("bsfl %1, %0" : "=r" (i) : "rm" (n)); __asm__("bsfl %1, %0" : "=r" (i) : "rm" (n));
return i; return i;
#elif defined(_MSC_VER) && _MSC_VER >= 1400 #elif defined(_MSC_VER)
uint32_t i; unsigned long i;
_BitScanForward((DWORD *)&i, n); _BitScanForward(&i, n);
return i; return i;
#else #else
uint32_t i = 0; uint32_t i = 0;
if ((n & UINT32_C(0x0000FFFF)) == 0) { if ((n & 0x0000FFFF) == 0) {
n >>= 16; n >>= 16;
i = 16; i = 16;
} }
if ((n & UINT32_C(0x000000FF)) == 0) { if ((n & 0x000000FF) == 0) {
n >>= 8; n >>= 8;
i += 8; i += 8;
} }
if ((n & UINT32_C(0x0000000F)) == 0) { if ((n & 0x0000000F) == 0) {
n >>= 4; n >>= 4;
i += 4; i += 4;
} }
if ((n & UINT32_C(0x00000003)) == 0) { if ((n & 0x00000003) == 0) {
n >>= 2; n >>= 2;
i += 2; i += 2;
} }
if ((n & UINT32_C(0x00000001)) == 0) if ((n & 0x00000001) == 0)
++i; ++i;
return i; return i;

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// //
/// \file tuklib_mstr.h /// \file tuklib_mbstr.h
/// \brief Utility functions for handling multibyte strings /// \brief Utility functions for handling multibyte strings
/// ///
/// If not enough multibyte string support is available in the C library, /// If not enough multibyte string support is available in the C library,

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// //
/// \file tuklib_mstr_fw.c /// \file tuklib_mbstr_fw.c
/// \brief Get the field width for printf() e.g. to align table columns /// \brief Get the field width for printf() e.g. to align table columns
// //
// Author: Lasse Collin // Author: Lasse Collin

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// //
/// \file tuklib_mstr_width.c /// \file tuklib_mbstr_width.c
/// \brief Calculate width of a multibyte string /// \brief Calculate width of a multibyte string
// //
// Author: Lasse Collin // Author: Lasse Collin
@ -11,6 +11,7 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include "tuklib_mbstr.h" #include "tuklib_mbstr.h"
#include <string.h>
#if defined(HAVE_MBRTOWC) && defined(HAVE_WCWIDTH) #if defined(HAVE_MBRTOWC) && defined(HAVE_WCWIDTH)
# include <wchar.h> # include <wchar.h>
@ -50,7 +51,7 @@ tuklib_mbstr_width(const char *str, size_t *bytes)
if (wc_width < 0) if (wc_width < 0)
return (size_t)-1; return (size_t)-1;
width += wc_width; width += (size_t)wc_width;
} }
// Require that the string ends in the initial shift state. // Require that the string ends in the initial shift state.

View File

@ -86,7 +86,8 @@ tuklib_physmem(void)
// GlobalMemoryStatusEx() conditionally. // GlobalMemoryStatusEx() conditionally.
HMODULE kernel32 = GetModuleHandle("kernel32.dll"); HMODULE kernel32 = GetModuleHandle("kernel32.dll");
if (kernel32 != NULL) { if (kernel32 != NULL) {
BOOL (WINAPI *gmse)(LPMEMORYSTATUSEX) = GetProcAddress( typedef BOOL (WINAPI *gmse_type)(LPMEMORYSTATUSEX);
gmse_type gmse = (gmse_type)GetProcAddress(
kernel32, "GlobalMemoryStatusEx"); kernel32, "GlobalMemoryStatusEx");
if (gmse != NULL) { if (gmse != NULL) {
MEMORYSTATUSEX meminfo; MEMORYSTATUSEX meminfo;

View File

@ -24,7 +24,7 @@ liblzma_la_CPPFLAGS = \
-I$(top_srcdir)/src/liblzma/simple \ -I$(top_srcdir)/src/liblzma/simple \
-I$(top_srcdir)/src/common \ -I$(top_srcdir)/src/common \
-DTUKLIB_SYMBOL_PREFIX=lzma_ -DTUKLIB_SYMBOL_PREFIX=lzma_
liblzma_la_LDFLAGS = -no-undefined -version-info 7:1:2 liblzma_la_LDFLAGS = -no-undefined -version-info 7:5:2
EXTRA_DIST += liblzma.map validate_map.sh EXTRA_DIST += liblzma.map validate_map.sh
if COND_SYMVERS if COND_SYMVERS

View File

@ -82,12 +82,20 @@
# if !defined(UINT32_C) || !defined(UINT64_C) \ # if !defined(UINT32_C) || !defined(UINT64_C) \
|| !defined(UINT32_MAX) || !defined(UINT64_MAX) || !defined(UINT32_MAX) || !defined(UINT64_MAX)
/* /*
* MSVC has no C99 support, and thus it cannot be used to * MSVC versions older than 2013 have no C99 support, and
* compile liblzma. The liblzma API has to still be usable * thus they cannot be used to compile liblzma. Using an
* from MSVC, so we need to define the required standard * existing liblzma.dll with old MSVC can work though(*),
* integer types here. * but we need to define the required standard integer
* types here in a MSVC-specific way.
*
* (*) If you do this, the existing liblzma.dll probably uses
* a different runtime library than your MSVC-built
* application. Mixing runtimes is generally bad, but
* in this case it should work as long as you avoid
* the few rarely-needed liblzma functions that allocate
* memory and expect the caller to free it using free().
*/ */
# if defined(_WIN32) && defined(_MSC_VER) # if defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1800
typedef unsigned __int8 uint8_t; typedef unsigned __int8 uint8_t;
typedef unsigned __int32 uint32_t; typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t; typedef unsigned __int64 uint64_t;
@ -211,8 +219,13 @@
*/ */
#ifndef lzma_nothrow #ifndef lzma_nothrow
# if defined(__cplusplus) # if defined(__cplusplus)
# define lzma_nothrow throw() # if __cplusplus >= 201103L
# elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) # define lzma_nothrow noexcept
# else
# define lzma_nothrow throw()
# endif
# elif defined(__GNUC__) && (__GNUC__ > 3 \
|| (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
# define lzma_nothrow __attribute__((__nothrow__)) # define lzma_nothrow __attribute__((__nothrow__))
# else # else
# define lzma_nothrow # define lzma_nothrow
@ -229,7 +242,7 @@
* break anything if these are sometimes enabled and sometimes not, only * break anything if these are sometimes enabled and sometimes not, only
* affects warnings and optimizations. * affects warnings and optimizations.
*/ */
#if __GNUC__ >= 3 #if defined(__GNUC__) && __GNUC__ >= 3
# ifndef lzma_attribute # ifndef lzma_attribute
# define lzma_attribute(attr) __attribute__(attr) # define lzma_attribute(attr) __attribute__(attr)
# endif # endif

View File

@ -644,11 +644,16 @@ extern LZMA_API(uint64_t) lzma_memlimit_get(const lzma_stream *strm)
* This function is supported only when *strm has been initialized with * This function is supported only when *strm has been initialized with
* a function that takes a memlimit argument. * a function that takes a memlimit argument.
* *
* liblzma 5.2.3 and earlier has a bug where memlimit value of 0 causes
* this function to do nothing (leaving the limit unchanged) and still
* return LZMA_OK. Later versions treat 0 as if 1 had been specified (so
* lzma_memlimit_get() will return 1 even if you specify 0 here).
*
* \return - LZMA_OK: New memory usage limit successfully set. * \return - LZMA_OK: New memory usage limit successfully set.
* - LZMA_MEMLIMIT_ERROR: The new limit is too small. * - LZMA_MEMLIMIT_ERROR: The new limit is too small.
* The limit was not changed. * The limit was not changed.
* - LZMA_PROG_ERROR: Invalid arguments, e.g. *strm doesn't * - LZMA_PROG_ERROR: Invalid arguments, e.g. *strm doesn't
* support memory usage limit or memlimit was zero. * support memory usage limit.
*/ */
extern LZMA_API(lzma_ret) lzma_memlimit_set( extern LZMA_API(lzma_ret) lzma_memlimit_set(
lzma_stream *strm, uint64_t memlimit) lzma_nothrow; lzma_stream *strm, uint64_t memlimit) lzma_nothrow;

View File

@ -448,7 +448,7 @@ extern LZMA_API(lzma_vli) lzma_block_total_size(const lzma_block *block)
* - LZMA_MEM_ERROR * - LZMA_MEM_ERROR
* - LZMA_OPTIONS_ERROR * - LZMA_OPTIONS_ERROR
* - LZMA_UNSUPPORTED_CHECK: block->check specifies a Check ID * - LZMA_UNSUPPORTED_CHECK: block->check specifies a Check ID
* that is not supported by this buid of liblzma. Initializing * that is not supported by this build of liblzma. Initializing
* the encoder failed. * the encoder failed.
* - LZMA_PROG_ERROR * - LZMA_PROG_ERROR
*/ */

View File

@ -520,7 +520,10 @@ extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
* *
* \param strm Pointer to properly prepared lzma_stream * \param strm Pointer to properly prepared lzma_stream
* \param memlimit Memory usage limit as bytes. Use UINT64_MAX * \param memlimit Memory usage limit as bytes. Use UINT64_MAX
* to effectively disable the limiter. * to effectively disable the limiter. liblzma
* 5.2.3 and earlier don't allow 0 here and return
* LZMA_PROG_ERROR; later versions treat 0 as if 1
* had been specified.
* \param flags Bitwise-or of zero or more of the decoder flags: * \param flags Bitwise-or of zero or more of the decoder flags:
* LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK, * LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK,
* LZMA_TELL_ANY_CHECK, LZMA_CONCATENATED * LZMA_TELL_ANY_CHECK, LZMA_CONCATENATED
@ -544,7 +547,10 @@ extern LZMA_API(lzma_ret) lzma_stream_decoder(
* *
* \param strm Pointer to properly prepared lzma_stream * \param strm Pointer to properly prepared lzma_stream
* \param memlimit Memory usage limit as bytes. Use UINT64_MAX * \param memlimit Memory usage limit as bytes. Use UINT64_MAX
* to effectively disable the limiter. * to effectively disable the limiter. liblzma
* 5.2.3 and earlier don't allow 0 here and return
* LZMA_PROG_ERROR; later versions treat 0 as if 1
* had been specified.
* \param flags Bitwise-or of flags, or zero for no flags. * \param flags Bitwise-or of flags, or zero for no flags.
* *
* \return - LZMA_OK: Initialization was successful. * \return - LZMA_OK: Initialization was successful.
@ -560,9 +566,16 @@ extern LZMA_API(lzma_ret) lzma_auto_decoder(
/** /**
* \brief Initialize .lzma decoder (legacy file format) * \brief Initialize .lzma decoder (legacy file format)
* *
* \param strm Pointer to properly prepared lzma_stream
* \param memlimit Memory usage limit as bytes. Use UINT64_MAX
* to effectively disable the limiter. liblzma
* 5.2.3 and earlier don't allow 0 here and return
* LZMA_PROG_ERROR; later versions treat 0 as if 1
* had been specified.
*
* Valid `action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH. * Valid `action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH.
* There is no need to use LZMA_FINISH, but allowing it may simplify * There is no need to use LZMA_FINISH, but it's allowed because it may
* certain types of applications. * simplify certain types of applications.
* *
* \return - LZMA_OK * \return - LZMA_OK
* - LZMA_MEM_ERROR * - LZMA_MEM_ERROR

View File

@ -341,9 +341,10 @@ extern LZMA_API(lzma_ret) lzma_properties_encode(
* \param filter filter->id must have been set to the correct * \param filter filter->id must have been set to the correct
* Filter ID. filter->options doesn't need to be * Filter ID. filter->options doesn't need to be
* initialized (it's not freed by this function). The * initialized (it's not freed by this function). The
* decoded options will be stored to filter->options. * decoded options will be stored in filter->options;
* filter->options is set to NULL if there are no * it's application's responsibility to free it when
* properties or if an error occurs. * appropriate. filter->options is set to NULL if
* there are no properties or if an error occurs.
* \param allocator Custom memory allocator used to allocate the * \param allocator Custom memory allocator used to allocate the
* options. Set to NULL to use the default malloc(), * options. Set to NULL to use the default malloc(),
* and in case of an error, also free(). * and in case of an error, also free().

View File

@ -6,7 +6,7 @@
* ways to limit the resource usage. Applications linking against liblzma * ways to limit the resource usage. Applications linking against liblzma
* need to do the actual decisions how much resources to let liblzma to use. * need to do the actual decisions how much resources to let liblzma to use.
* To ease making these decisions, liblzma provides functions to find out * To ease making these decisions, liblzma provides functions to find out
* the relevant capabilities of the underlaying hardware. Currently there * the relevant capabilities of the underlying hardware. Currently there
* is only a function to find out the amount of RAM, but in the future there * is only a function to find out the amount of RAM, but in the future there
* will be also a function to detect how many concurrent threads the system * will be also a function to detect how many concurrent threads the system
* can run. * can run.

View File

@ -586,8 +586,7 @@ extern LZMA_API(lzma_index *) lzma_index_dup(
* \param i Pointer to lzma_index which should be encoded. * \param i Pointer to lzma_index which should be encoded.
* *
* The valid `action' values for lzma_code() are LZMA_RUN and LZMA_FINISH. * The valid `action' values for lzma_code() are LZMA_RUN and LZMA_FINISH.
* It is enough to use only one of them (you can choose freely; use LZMA_RUN * It is enough to use only one of them (you can choose freely).
* to support liblzma versions older than 5.0.0).
* *
* \return - LZMA_OK: Initialization succeeded, continue with lzma_code(). * \return - LZMA_OK: Initialization succeeded, continue with lzma_code().
* - LZMA_MEM_ERROR * - LZMA_MEM_ERROR
@ -610,16 +609,21 @@ extern LZMA_API(lzma_ret) lzma_index_encoder(
* to a new lzma_index, which the application * to a new lzma_index, which the application
* has to later free with lzma_index_end(). * has to later free with lzma_index_end().
* \param memlimit How much memory the resulting lzma_index is * \param memlimit How much memory the resulting lzma_index is
* allowed to require. * allowed to require. liblzma 5.2.3 and earlier
* don't allow 0 here and return LZMA_PROG_ERROR;
* later versions treat 0 as if 1 had been specified.
* *
* The valid `action' values for lzma_code() are LZMA_RUN and LZMA_FINISH. * Valid `action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH.
* It is enough to use only one of them (you can choose freely; use LZMA_RUN * There is no need to use LZMA_FINISH, but it's allowed because it may
* to support liblzma versions older than 5.0.0). * simplify certain types of applications.
* *
* \return - LZMA_OK: Initialization succeeded, continue with lzma_code(). * \return - LZMA_OK: Initialization succeeded, continue with lzma_code().
* - LZMA_MEM_ERROR * - LZMA_MEM_ERROR
* - LZMA_MEMLIMIT_ERROR
* - LZMA_PROG_ERROR * - LZMA_PROG_ERROR
*
* liblzma 5.2.3 and older list also LZMA_MEMLIMIT_ERROR here
* but that error code has never been possible from this
* initialization function.
*/ */
extern LZMA_API(lzma_ret) lzma_index_decoder( extern LZMA_API(lzma_ret) lzma_index_decoder(
lzma_stream *strm, lzma_index **i, uint64_t memlimit) lzma_stream *strm, lzma_index **i, uint64_t memlimit)

View File

@ -301,7 +301,7 @@ typedef struct {
* (2^ pb =2^2=4), which is often a good choice when there's * (2^ pb =2^2=4), which is often a good choice when there's
* no better guess. * no better guess.
* *
* When the aligment is known, setting pb accordingly may reduce * When the alignment is known, setting pb accordingly may reduce
* the file size a little. E.g. with text files having one-byte * the file size a little. E.g. with text files having one-byte
* alignment (US-ASCII, ISO-8859-*, UTF-8), setting pb=0 can * alignment (US-ASCII, ISO-8859-*, UTF-8), setting pb=0 can
* improve compression slightly. For UTF-16 text, pb=1 is a good * improve compression slightly. For UTF-16 text, pb=1 is a good

View File

@ -22,7 +22,7 @@
*/ */
#define LZMA_VERSION_MAJOR 5 #define LZMA_VERSION_MAJOR 5
#define LZMA_VERSION_MINOR 2 #define LZMA_VERSION_MINOR 2
#define LZMA_VERSION_PATCH 1 #define LZMA_VERSION_PATCH 5
#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE #define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE
#ifndef LZMA_VERSION_COMMIT #ifndef LZMA_VERSION_COMMIT

View File

@ -54,7 +54,7 @@
* *
* Valid VLI values are in the range [0, LZMA_VLI_MAX]. Unknown value is * Valid VLI values are in the range [0, LZMA_VLI_MAX]. Unknown value is
* indicated with LZMA_VLI_UNKNOWN, which is the maximum value of the * indicated with LZMA_VLI_UNKNOWN, which is the maximum value of the
* underlaying integer type. * underlying integer type.
* *
* lzma_vli will be uint64_t for the foreseeable future. If a bigger size * lzma_vli will be uint64_t for the foreseeable future. If a bigger size
* is needed in the future, it is guaranteed that 2 * LZMA_VLI_MAX will * is needed in the future, it is guaranteed that 2 * LZMA_VLI_MAX will

View File

@ -15,7 +15,18 @@
#include "common.h" #include "common.h"
#if defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H) // If the function for external SHA-256 is missing, use the internal SHA-256
// code. Due to how configure works, these defines can only get defined when
// both a usable header and a type have already been found.
#if !(defined(HAVE_CC_SHA256_INIT) \
|| defined(HAVE_SHA256_INIT) \
|| defined(HAVE_SHA256INIT))
# define HAVE_INTERNAL_SHA256 1
#endif
#if defined(HAVE_INTERNAL_SHA256)
// Nothing
#elif defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
# include <CommonCrypto/CommonDigest.h> # include <CommonCrypto/CommonDigest.h>
#elif defined(HAVE_SHA256_H) #elif defined(HAVE_SHA256_H)
# include <sys/types.h> # include <sys/types.h>
@ -23,18 +34,9 @@
#elif defined(HAVE_SHA2_H) #elif defined(HAVE_SHA2_H)
# include <sys/types.h> # include <sys/types.h>
# include <sha2.h> # include <sha2.h>
#elif defined(HAVE_MINIX_SHA2_H)
# include <sys/types.h>
# include <minix/sha2.h>
#endif #endif
#if defined(HAVE_CC_SHA256_CTX) #if defined(HAVE_INTERNAL_SHA256)
typedef CC_SHA256_CTX lzma_sha256_state;
#elif defined(HAVE_SHA256_CTX)
typedef SHA256_CTX lzma_sha256_state;
#elif defined(HAVE_SHA2_CTX)
typedef SHA2_CTX lzma_sha256_state;
#else
/// State for the internal SHA-256 implementation /// State for the internal SHA-256 implementation
typedef struct { typedef struct {
/// Internal state /// Internal state
@ -43,9 +45,17 @@ typedef struct {
/// Size of the message excluding padding /// Size of the message excluding padding
uint64_t size; uint64_t size;
} lzma_sha256_state; } lzma_sha256_state;
#elif defined(HAVE_CC_SHA256_CTX)
typedef CC_SHA256_CTX lzma_sha256_state;
#elif defined(HAVE_SHA256_CTX)
typedef SHA256_CTX lzma_sha256_state;
#elif defined(HAVE_SHA2_CTX)
typedef SHA2_CTX lzma_sha256_state;
#endif #endif
#if defined(HAVE_CC_SHA256_INIT) #if defined(HAVE_INTERNAL_SHA256)
// Nothing
#elif defined(HAVE_CC_SHA256_INIT)
# define LZMA_SHA256FUNC(x) CC_SHA256_ ## x # define LZMA_SHA256FUNC(x) CC_SHA256_ ## x
#elif defined(HAVE_SHA256_INIT) #elif defined(HAVE_SHA256_INIT)
# define LZMA_SHA256FUNC(x) SHA256_ ## x # define LZMA_SHA256FUNC(x) SHA256_ ## x

View File

@ -49,7 +49,7 @@ lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
// Calculate the CRC32 using the slice-by-eight algorithm. // Calculate the CRC32 using the slice-by-eight algorithm.
while (buf < limit) { while (buf < limit) {
crc ^= *(const uint32_t *)(buf); crc ^= aligned_read32ne(buf);
buf += 4; buf += 4;
crc = lzma_crc32_table[7][A(crc)] crc = lzma_crc32_table[7][A(crc)]
@ -57,7 +57,7 @@ lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
^ lzma_crc32_table[5][C(crc)] ^ lzma_crc32_table[5][C(crc)]
^ lzma_crc32_table[4][D(crc)]; ^ lzma_crc32_table[4][D(crc)];
const uint32_t tmp = *(const uint32_t *)(buf); const uint32_t tmp = aligned_read32ne(buf);
buf += 4; buf += 4;
// At least with some compilers, it is critical for // At least with some compilers, it is critical for

View File

@ -12,6 +12,9 @@
#include "common.h" #include "common.h"
// Having the declaration here silences clang -Wmissing-variable-declarations.
extern const uint32_t lzma_crc32_table[8][256];
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
# include "crc32_table_be.h" # include "crc32_table_be.h"
#else #else

View File

@ -47,9 +47,9 @@ lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc)
while (buf < limit) { while (buf < limit) {
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
const uint32_t tmp = (crc >> 32) const uint32_t tmp = (crc >> 32)
^ *(const uint32_t *)(buf); ^ aligned_read32ne(buf);
#else #else
const uint32_t tmp = crc ^ *(const uint32_t *)(buf); const uint32_t tmp = crc ^ aligned_read32ne(buf);
#endif #endif
buf += 4; buf += 4;

View File

@ -12,6 +12,9 @@
#include "common.h" #include "common.h"
// Having the declaration here silences clang -Wmissing-variable-declarations.
extern const uint64_t lzma_crc64_table[4][256];
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
# include "crc64_table_be.h" # include "crc64_table_be.h"
#else #else

View File

@ -21,6 +21,10 @@ liblzma_la_SOURCES += \
common/stream_flags_common.h \ common/stream_flags_common.h \
common/vli_size.c common/vli_size.c
if COND_THREADS
liblzma_la_SOURCES += common/hardware_cputhreads.c
endif
if COND_MAIN_ENCODER if COND_MAIN_ENCODER
liblzma_la_SOURCES += \ liblzma_la_SOURCES += \
common/alone_encoder.c \ common/alone_encoder.c \
@ -45,7 +49,6 @@ liblzma_la_SOURCES += \
if COND_THREADS if COND_THREADS
liblzma_la_SOURCES += \ liblzma_la_SOURCES += \
common/hardware_cputhreads.c \
common/outqueue.c \ common/outqueue.c \
common/outqueue.h \ common/outqueue.h \
common/stream_encoder_mt.c common/stream_encoder_mt.c

View File

@ -15,7 +15,7 @@
#include "lz_decoder.h" #include "lz_decoder.h"
struct lzma_coder_s { typedef struct {
lzma_next_coder next; lzma_next_coder next;
enum { enum {
@ -46,17 +46,18 @@ struct lzma_coder_s {
/// Options decoded from the header needed to initialize /// Options decoded from the header needed to initialize
/// the LZMA decoder /// the LZMA decoder
lzma_options_lzma options; lzma_options_lzma options;
}; } lzma_alone_coder;
static lzma_ret static lzma_ret
alone_decode(lzma_coder *coder, alone_decode(void *coder_ptr, const lzma_allocator *allocator,
const lzma_allocator *allocator lzma_attribute((__unused__)),
const uint8_t *restrict in, size_t *restrict in_pos, const uint8_t *restrict in, size_t *restrict in_pos,
size_t in_size, uint8_t *restrict out, size_t in_size, uint8_t *restrict out,
size_t *restrict out_pos, size_t out_size, size_t *restrict out_pos, size_t out_size,
lzma_action action) lzma_action action)
{ {
lzma_alone_coder *coder = coder_ptr;
while (*out_pos < out_size while (*out_pos < out_size
&& (coder->sequence == SEQ_CODE || *in_pos < in_size)) && (coder->sequence == SEQ_CODE || *in_pos < in_size))
switch (coder->sequence) { switch (coder->sequence) {
@ -166,8 +167,9 @@ alone_decode(lzma_coder *coder,
static void static void
alone_decoder_end(lzma_coder *coder, const lzma_allocator *allocator) alone_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
{ {
lzma_alone_coder *coder = coder_ptr;
lzma_next_end(&coder->next, allocator); lzma_next_end(&coder->next, allocator);
lzma_free(coder, allocator); lzma_free(coder, allocator);
return; return;
@ -175,9 +177,11 @@ alone_decoder_end(lzma_coder *coder, const lzma_allocator *allocator)
static lzma_ret static lzma_ret
alone_decoder_memconfig(lzma_coder *coder, uint64_t *memusage, alone_decoder_memconfig(void *coder_ptr, uint64_t *memusage,
uint64_t *old_memlimit, uint64_t new_memlimit) uint64_t *old_memlimit, uint64_t new_memlimit)
{ {
lzma_alone_coder *coder = coder_ptr;
*memusage = coder->memusage; *memusage = coder->memusage;
*old_memlimit = coder->memlimit; *old_memlimit = coder->memlimit;
@ -198,29 +202,29 @@ lzma_alone_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
{ {
lzma_next_coder_init(&lzma_alone_decoder_init, next, allocator); lzma_next_coder_init(&lzma_alone_decoder_init, next, allocator);
if (memlimit == 0) lzma_alone_coder *coder = next->coder;
return LZMA_PROG_ERROR;
if (next->coder == NULL) { if (coder == NULL) {
next->coder = lzma_alloc(sizeof(lzma_coder), allocator); coder = lzma_alloc(sizeof(lzma_alone_coder), allocator);
if (next->coder == NULL) if (coder == NULL)
return LZMA_MEM_ERROR; return LZMA_MEM_ERROR;
next->coder = coder;
next->code = &alone_decode; next->code = &alone_decode;
next->end = &alone_decoder_end; next->end = &alone_decoder_end;
next->memconfig = &alone_decoder_memconfig; next->memconfig = &alone_decoder_memconfig;
next->coder->next = LZMA_NEXT_CODER_INIT; coder->next = LZMA_NEXT_CODER_INIT;
} }
next->coder->sequence = SEQ_PROPERTIES; coder->sequence = SEQ_PROPERTIES;
next->coder->picky = picky; coder->picky = picky;
next->coder->pos = 0; coder->pos = 0;
next->coder->options.dict_size = 0; coder->options.dict_size = 0;
next->coder->options.preset_dict = NULL; coder->options.preset_dict = NULL;
next->coder->options.preset_dict_size = 0; coder->options.preset_dict_size = 0;
next->coder->uncompressed_size = 0; coder->uncompressed_size = 0;
next->coder->memlimit = memlimit; coder->memlimit = my_max(1, memlimit);
next->coder->memusage = LZMA_MEMUSAGE_BASE; coder->memusage = LZMA_MEMUSAGE_BASE;
return LZMA_OK; return LZMA_OK;
} }

View File

@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// //
/// \file alone_decoder.c /// \file alone_encoder.c
/// \brief Decoder for LZMA_Alone files /// \brief Encoder for LZMA_Alone files
// //
// Author: Lasse Collin // Author: Lasse Collin
// //
@ -17,7 +17,7 @@
#define ALONE_HEADER_SIZE (1 + 4 + 8) #define ALONE_HEADER_SIZE (1 + 4 + 8)
struct lzma_coder_s { typedef struct {
lzma_next_coder next; lzma_next_coder next;
enum { enum {
@ -27,17 +27,18 @@ struct lzma_coder_s {
size_t header_pos; size_t header_pos;
uint8_t header[ALONE_HEADER_SIZE]; uint8_t header[ALONE_HEADER_SIZE];
}; } lzma_alone_coder;
static lzma_ret static lzma_ret
alone_encode(lzma_coder *coder, alone_encode(void *coder_ptr, const lzma_allocator *allocator,
const lzma_allocator *allocator lzma_attribute((__unused__)),
const uint8_t *restrict in, size_t *restrict in_pos, const uint8_t *restrict in, size_t *restrict in_pos,
size_t in_size, uint8_t *restrict out, size_t in_size, uint8_t *restrict out,
size_t *restrict out_pos, size_t out_size, size_t *restrict out_pos, size_t out_size,
lzma_action action) lzma_action action)
{ {
lzma_alone_coder *coder = coder_ptr;
while (*out_pos < out_size) while (*out_pos < out_size)
switch (coder->sequence) { switch (coder->sequence) {
case SEQ_HEADER: case SEQ_HEADER:
@ -65,8 +66,9 @@ alone_encode(lzma_coder *coder,
static void static void
alone_encoder_end(lzma_coder *coder, const lzma_allocator *allocator) alone_encoder_end(void *coder_ptr, const lzma_allocator *allocator)
{ {
lzma_alone_coder *coder = coder_ptr;
lzma_next_end(&coder->next, allocator); lzma_next_end(&coder->next, allocator);
lzma_free(coder, allocator); lzma_free(coder, allocator);
return; return;
@ -80,23 +82,26 @@ alone_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
{ {
lzma_next_coder_init(&alone_encoder_init, next, allocator); lzma_next_coder_init(&alone_encoder_init, next, allocator);
if (next->coder == NULL) { lzma_alone_coder *coder = next->coder;
next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
if (next->coder == NULL) if (coder == NULL) {
coder = lzma_alloc(sizeof(lzma_alone_coder), allocator);
if (coder == NULL)
return LZMA_MEM_ERROR; return LZMA_MEM_ERROR;
next->coder = coder;
next->code = &alone_encode; next->code = &alone_encode;
next->end = &alone_encoder_end; next->end = &alone_encoder_end;
next->coder->next = LZMA_NEXT_CODER_INIT; coder->next = LZMA_NEXT_CODER_INIT;
} }
// Basic initializations // Basic initializations
next->coder->sequence = SEQ_HEADER; coder->sequence = SEQ_HEADER;
next->coder->header_pos = 0; coder->header_pos = 0;
// Encode the header: // Encode the header:
// - Properties (1 byte) // - Properties (1 byte)
if (lzma_lzma_lclppb_encode(options, next->coder->header)) if (lzma_lzma_lclppb_encode(options, coder->header))
return LZMA_OPTIONS_ERROR; return LZMA_OPTIONS_ERROR;
// - Dictionary size (4 bytes) // - Dictionary size (4 bytes)
@ -116,10 +121,10 @@ alone_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
if (d != UINT32_MAX) if (d != UINT32_MAX)
++d; ++d;
unaligned_write32le(next->coder->header + 1, d); write32le(coder->header + 1, d);
// - Uncompressed size (always unknown and using EOPM) // - Uncompressed size (always unknown and using EOPM)
memset(next->coder->header + 1 + 4, 0xFF, 8); memset(coder->header + 1 + 4, 0xFF, 8);
// Initialize the LZMA encoder. // Initialize the LZMA encoder.
const lzma_filter_info filters[2] = { const lzma_filter_info filters[2] = {
@ -131,7 +136,7 @@ alone_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
} }
}; };
return lzma_next_filter_init(&next->coder->next, allocator, filters); return lzma_next_filter_init(&coder->next, allocator, filters);
} }

View File

@ -14,7 +14,7 @@
#include "alone_decoder.h" #include "alone_decoder.h"
struct lzma_coder_s { typedef struct {
/// Stream decoder or LZMA_Alone decoder /// Stream decoder or LZMA_Alone decoder
lzma_next_coder next; lzma_next_coder next;
@ -26,15 +26,17 @@ struct lzma_coder_s {
SEQ_CODE, SEQ_CODE,
SEQ_FINISH, SEQ_FINISH,
} sequence; } sequence;
}; } lzma_auto_coder;
static lzma_ret static lzma_ret
auto_decode(lzma_coder *coder, const lzma_allocator *allocator, auto_decode(void *coder_ptr, const lzma_allocator *allocator,
const uint8_t *restrict in, size_t *restrict in_pos, const uint8_t *restrict in, size_t *restrict in_pos,
size_t in_size, uint8_t *restrict out, size_t in_size, uint8_t *restrict out,
size_t *restrict out_pos, size_t out_size, lzma_action action) size_t *restrict out_pos, size_t out_size, lzma_action action)
{ {
lzma_auto_coder *coder = coder_ptr;
switch (coder->sequence) { switch (coder->sequence) {
case SEQ_INIT: case SEQ_INIT:
if (*in_pos >= in_size) if (*in_pos >= in_size)
@ -100,8 +102,9 @@ auto_decode(lzma_coder *coder, const lzma_allocator *allocator,
static void static void
auto_decoder_end(lzma_coder *coder, const lzma_allocator *allocator) auto_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
{ {
lzma_auto_coder *coder = coder_ptr;
lzma_next_end(&coder->next, allocator); lzma_next_end(&coder->next, allocator);
lzma_free(coder, allocator); lzma_free(coder, allocator);
return; return;
@ -109,8 +112,10 @@ auto_decoder_end(lzma_coder *coder, const lzma_allocator *allocator)
static lzma_check static lzma_check
auto_decoder_get_check(const lzma_coder *coder) auto_decoder_get_check(const void *coder_ptr)
{ {
const lzma_auto_coder *coder = coder_ptr;
// It is LZMA_Alone if get_check is NULL. // It is LZMA_Alone if get_check is NULL.
return coder->next.get_check == NULL ? LZMA_CHECK_NONE return coder->next.get_check == NULL ? LZMA_CHECK_NONE
: coder->next.get_check(coder->next.coder); : coder->next.get_check(coder->next.coder);
@ -118,9 +123,11 @@ auto_decoder_get_check(const lzma_coder *coder)
static lzma_ret static lzma_ret
auto_decoder_memconfig(lzma_coder *coder, uint64_t *memusage, auto_decoder_memconfig(void *coder_ptr, uint64_t *memusage,
uint64_t *old_memlimit, uint64_t new_memlimit) uint64_t *old_memlimit, uint64_t new_memlimit)
{ {
lzma_auto_coder *coder = coder_ptr;
lzma_ret ret; lzma_ret ret;
if (coder->next.memconfig != NULL) { if (coder->next.memconfig != NULL) {
@ -132,7 +139,10 @@ auto_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
// the current memory usage. // the current memory usage.
*memusage = LZMA_MEMUSAGE_BASE; *memusage = LZMA_MEMUSAGE_BASE;
*old_memlimit = coder->memlimit; *old_memlimit = coder->memlimit;
ret = LZMA_OK; ret = LZMA_OK;
if (new_memlimit != 0 && new_memlimit < *memusage)
ret = LZMA_MEMLIMIT_ERROR;
} }
if (ret == LZMA_OK && new_memlimit != 0) if (ret == LZMA_OK && new_memlimit != 0)
@ -148,27 +158,26 @@ auto_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
{ {
lzma_next_coder_init(&auto_decoder_init, next, allocator); lzma_next_coder_init(&auto_decoder_init, next, allocator);
if (memlimit == 0)
return LZMA_PROG_ERROR;
if (flags & ~LZMA_SUPPORTED_FLAGS) if (flags & ~LZMA_SUPPORTED_FLAGS)
return LZMA_OPTIONS_ERROR; return LZMA_OPTIONS_ERROR;
if (next->coder == NULL) { lzma_auto_coder *coder = next->coder;
next->coder = lzma_alloc(sizeof(lzma_coder), allocator); if (coder == NULL) {
if (next->coder == NULL) coder = lzma_alloc(sizeof(lzma_auto_coder), allocator);
if (coder == NULL)
return LZMA_MEM_ERROR; return LZMA_MEM_ERROR;
next->coder = coder;
next->code = &auto_decode; next->code = &auto_decode;
next->end = &auto_decoder_end; next->end = &auto_decoder_end;
next->get_check = &auto_decoder_get_check; next->get_check = &auto_decoder_get_check;
next->memconfig = &auto_decoder_memconfig; next->memconfig = &auto_decoder_memconfig;
next->coder->next = LZMA_NEXT_CODER_INIT; coder->next = LZMA_NEXT_CODER_INIT;
} }
next->coder->memlimit = memlimit; coder->memlimit = my_max(1, memlimit);
next->coder->flags = flags; coder->flags = flags;
next->coder->sequence = SEQ_INIT; coder->sequence = SEQ_INIT;
return LZMA_OK; return LZMA_OK;
} }

View File

@ -15,7 +15,7 @@
#include "check.h" #include "check.h"
struct lzma_coder_s { typedef struct {
enum { enum {
SEQ_CODE, SEQ_CODE,
SEQ_PADDING, SEQ_PADDING,
@ -48,7 +48,7 @@ struct lzma_coder_s {
/// True if the integrity check won't be calculated and verified. /// True if the integrity check won't be calculated and verified.
bool ignore_check; bool ignore_check;
}; } lzma_block_coder;
static inline bool static inline bool
@ -74,11 +74,13 @@ is_size_valid(lzma_vli size, lzma_vli reference)
static lzma_ret static lzma_ret
block_decode(lzma_coder *coder, const lzma_allocator *allocator, block_decode(void *coder_ptr, const lzma_allocator *allocator,
const uint8_t *restrict in, size_t *restrict in_pos, const uint8_t *restrict in, size_t *restrict in_pos,
size_t in_size, uint8_t *restrict out, size_t in_size, uint8_t *restrict out,
size_t *restrict out_pos, size_t out_size, lzma_action action) size_t *restrict out_pos, size_t out_size, lzma_action action)
{ {
lzma_block_coder *coder = coder_ptr;
switch (coder->sequence) { switch (coder->sequence) {
case SEQ_CODE: { case SEQ_CODE: {
const size_t in_start = *in_pos; const size_t in_start = *in_pos;
@ -177,8 +179,9 @@ block_decode(lzma_coder *coder, const lzma_allocator *allocator,
static void static void
block_decoder_end(lzma_coder *coder, const lzma_allocator *allocator) block_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
{ {
lzma_block_coder *coder = coder_ptr;
lzma_next_end(&coder->next, allocator); lzma_next_end(&coder->next, allocator);
lzma_free(coder, allocator); lzma_free(coder, allocator);
return; return;
@ -198,27 +201,29 @@ lzma_block_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
|| !lzma_vli_is_valid(block->uncompressed_size)) || !lzma_vli_is_valid(block->uncompressed_size))
return LZMA_PROG_ERROR; return LZMA_PROG_ERROR;
// Allocate and initialize *next->coder if needed. // Allocate *next->coder if needed.
if (next->coder == NULL) { lzma_block_coder *coder = next->coder;
next->coder = lzma_alloc(sizeof(lzma_coder), allocator); if (coder == NULL) {
if (next->coder == NULL) coder = lzma_alloc(sizeof(lzma_block_coder), allocator);
if (coder == NULL)
return LZMA_MEM_ERROR; return LZMA_MEM_ERROR;
next->coder = coder;
next->code = &block_decode; next->code = &block_decode;
next->end = &block_decoder_end; next->end = &block_decoder_end;
next->coder->next = LZMA_NEXT_CODER_INIT; coder->next = LZMA_NEXT_CODER_INIT;
} }
// Basic initializations // Basic initializations
next->coder->sequence = SEQ_CODE; coder->sequence = SEQ_CODE;
next->coder->block = block; coder->block = block;
next->coder->compressed_size = 0; coder->compressed_size = 0;
next->coder->uncompressed_size = 0; coder->uncompressed_size = 0;
// If Compressed Size is not known, we calculate the maximum allowed // If Compressed Size is not known, we calculate the maximum allowed
// value so that encoded size of the Block (including Block Padding) // value so that encoded size of the Block (including Block Padding)
// is still a valid VLI and a multiple of four. // is still a valid VLI and a multiple of four.
next->coder->compressed_limit coder->compressed_limit
= block->compressed_size == LZMA_VLI_UNKNOWN = block->compressed_size == LZMA_VLI_UNKNOWN
? (LZMA_VLI_MAX & ~LZMA_VLI_C(3)) ? (LZMA_VLI_MAX & ~LZMA_VLI_C(3))
- block->header_size - block->header_size
@ -228,14 +233,14 @@ lzma_block_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
// Initialize the check. It's caller's problem if the Check ID is not // Initialize the check. It's caller's problem if the Check ID is not
// supported, and the Block decoder cannot verify the Check field. // supported, and the Block decoder cannot verify the Check field.
// Caller can test lzma_check_is_supported(block->check). // Caller can test lzma_check_is_supported(block->check).
next->coder->check_pos = 0; coder->check_pos = 0;
lzma_check_init(&next->coder->check, block->check); lzma_check_init(&coder->check, block->check);
next->coder->ignore_check = block->version >= 1 coder->ignore_check = block->version >= 1
? block->ignore_check : false; ? block->ignore_check : false;
// Initialize the filter chain. // Initialize the filter chain.
return lzma_raw_decoder_init(&next->coder->next, allocator, return lzma_raw_decoder_init(&coder->next, allocator,
block->filters); block->filters);
} }

View File

@ -15,7 +15,7 @@
#include "check.h" #include "check.h"
struct lzma_coder_s { typedef struct {
/// The filters in the chain; initialized with lzma_raw_decoder_init(). /// The filters in the chain; initialized with lzma_raw_decoder_init().
lzma_next_coder next; lzma_next_coder next;
@ -41,15 +41,17 @@ struct lzma_coder_s {
/// Check of the uncompressed data /// Check of the uncompressed data
lzma_check_state check; lzma_check_state check;
}; } lzma_block_coder;
static lzma_ret static lzma_ret
block_encode(lzma_coder *coder, const lzma_allocator *allocator, block_encode(void *coder_ptr, const lzma_allocator *allocator,
const uint8_t *restrict in, size_t *restrict in_pos, const uint8_t *restrict in, size_t *restrict in_pos,
size_t in_size, uint8_t *restrict out, size_t in_size, uint8_t *restrict out,
size_t *restrict out_pos, size_t out_size, lzma_action action) size_t *restrict out_pos, size_t out_size, lzma_action action)
{ {
lzma_block_coder *coder = coder_ptr;
// Check that our amount of input stays in proper limits. // Check that our amount of input stays in proper limits.
if (LZMA_VLI_MAX - coder->uncompressed_size < in_size - *in_pos) if (LZMA_VLI_MAX - coder->uncompressed_size < in_size - *in_pos)
return LZMA_DATA_ERROR; return LZMA_DATA_ERROR;
@ -134,8 +136,9 @@ block_encode(lzma_coder *coder, const lzma_allocator *allocator,
static void static void
block_encoder_end(lzma_coder *coder, const lzma_allocator *allocator) block_encoder_end(void *coder_ptr, const lzma_allocator *allocator)
{ {
lzma_block_coder *coder = coder_ptr;
lzma_next_end(&coder->next, allocator); lzma_next_end(&coder->next, allocator);
lzma_free(coder, allocator); lzma_free(coder, allocator);
return; return;
@ -143,10 +146,12 @@ block_encoder_end(lzma_coder *coder, const lzma_allocator *allocator)
static lzma_ret static lzma_ret
block_encoder_update(lzma_coder *coder, const lzma_allocator *allocator, block_encoder_update(void *coder_ptr, const lzma_allocator *allocator,
const lzma_filter *filters lzma_attribute((__unused__)), const lzma_filter *filters lzma_attribute((__unused__)),
const lzma_filter *reversed_filters) const lzma_filter *reversed_filters)
{ {
lzma_block_coder *coder = coder_ptr;
if (coder->sequence != SEQ_CODE) if (coder->sequence != SEQ_CODE)
return LZMA_PROG_ERROR; return LZMA_PROG_ERROR;
@ -178,30 +183,31 @@ lzma_block_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
return LZMA_UNSUPPORTED_CHECK; return LZMA_UNSUPPORTED_CHECK;
// Allocate and initialize *next->coder if needed. // Allocate and initialize *next->coder if needed.
if (next->coder == NULL) { lzma_block_coder *coder = next->coder;
next->coder = lzma_alloc(sizeof(lzma_coder), allocator); if (coder == NULL) {
if (next->coder == NULL) coder = lzma_alloc(sizeof(lzma_block_coder), allocator);
if (coder == NULL)
return LZMA_MEM_ERROR; return LZMA_MEM_ERROR;
next->coder = coder;
next->code = &block_encode; next->code = &block_encode;
next->end = &block_encoder_end; next->end = &block_encoder_end;
next->update = &block_encoder_update; next->update = &block_encoder_update;
next->coder->next = LZMA_NEXT_CODER_INIT; coder->next = LZMA_NEXT_CODER_INIT;
} }
// Basic initializations // Basic initializations
next->coder->sequence = SEQ_CODE; coder->sequence = SEQ_CODE;
next->coder->block = block; coder->block = block;
next->coder->compressed_size = 0; coder->compressed_size = 0;
next->coder->uncompressed_size = 0; coder->uncompressed_size = 0;
next->coder->pos = 0; coder->pos = 0;
// Initialize the check // Initialize the check
lzma_check_init(&next->coder->check, block->check); lzma_check_init(&coder->check, block->check);
// Initialize the requested filters. // Initialize the requested filters.
return lzma_raw_encoder_init(&next->coder->next, allocator, return lzma_raw_encoder_init(&coder->next, allocator, block->filters);
block->filters);
} }

View File

@ -67,7 +67,7 @@ lzma_block_header_decode(lzma_block *block,
const size_t in_size = block->header_size - 4; const size_t in_size = block->header_size - 4;
// Verify CRC32 // Verify CRC32
if (lzma_crc32(in, in_size, 0) != unaligned_read32le(in + in_size)) if (lzma_crc32(in, in_size, 0) != read32le(in + in_size))
return LZMA_DATA_ERROR; return LZMA_DATA_ERROR;
// Check for unsupported flags. // Check for unsupported flags.
@ -98,7 +98,7 @@ lzma_block_header_decode(lzma_block *block,
block->uncompressed_size = LZMA_VLI_UNKNOWN; block->uncompressed_size = LZMA_VLI_UNKNOWN;
// Filter Flags // Filter Flags
const size_t filter_count = (in[1] & 3) + 1; const size_t filter_count = (in[1] & 3U) + 1;
for (size_t i = 0; i < filter_count; ++i) { for (size_t i = 0; i < filter_count; ++i) {
const lzma_ret ret = lzma_filter_flags_decode( const lzma_ret ret = lzma_filter_flags_decode(
&block->filters[i], allocator, &block->filters[i], allocator,

View File

@ -126,7 +126,7 @@ lzma_block_header_encode(const lzma_block *block, uint8_t *out)
memzero(out + out_pos, out_size - out_pos); memzero(out + out_pos, out_size - out_pos);
// CRC32 // CRC32
unaligned_write32le(out + out_size, lzma_crc32(out, out_size, 0)); write32le(out + out_size, lzma_crc32(out, out_size, 0));
return LZMA_OK; return LZMA_OK;
} }

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// //
/// \file block_header.c /// \file block_util.c
/// \brief Utility functions to handle lzma_block /// \brief Utility functions to handle lzma_block
// //
// Author: Lasse Collin // Author: Lasse Collin

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// //
/// \file common.h /// \file common.c
/// \brief Common functions needed in many places in liblzma /// \brief Common functions needed in many places in liblzma
// //
// Author: Lasse Collin // Author: Lasse Collin
@ -99,7 +99,11 @@ lzma_bufcpy(const uint8_t *restrict in, size_t *restrict in_pos,
const size_t out_avail = out_size - *out_pos; const size_t out_avail = out_size - *out_pos;
const size_t copy_size = my_min(in_avail, out_avail); const size_t copy_size = my_min(in_avail, out_avail);
memcpy(out + *out_pos, in + *in_pos, copy_size); // Call memcpy() only if there is something to copy. If there is
// nothing to copy, in or out might be NULL and then the memcpy()
// call would trigger undefined behavior.
if (copy_size > 0)
memcpy(out + *out_pos, in + *in_pos, copy_size);
*in_pos += copy_size; *in_pos += copy_size;
*out_pos += copy_size; *out_pos += copy_size;
@ -435,8 +439,10 @@ lzma_memlimit_set(lzma_stream *strm, uint64_t new_memlimit)
|| strm->internal->next.memconfig == NULL) || strm->internal->next.memconfig == NULL)
return LZMA_PROG_ERROR; return LZMA_PROG_ERROR;
if (new_memlimit != 0 && new_memlimit < LZMA_MEMUSAGE_BASE) // Zero is a special value that cannot be used as an actual limit.
return LZMA_MEMLIMIT_ERROR; // If 0 was specified, use 1 instead.
if (new_memlimit == 0)
new_memlimit = 1;
return strm->internal->next.memconfig(strm->internal->next.coder, return strm->internal->next.memconfig(strm->internal->next.coder,
&memusage, &old_memlimit, new_memlimit); &memusage, &old_memlimit, new_memlimit);

View File

@ -88,10 +88,6 @@
#define LZMA_TIMED_OUT 32 #define LZMA_TIMED_OUT 32
/// Type of encoder/decoder specific data; the actual structure is defined
/// differently in different coders.
typedef struct lzma_coder_s lzma_coder;
typedef struct lzma_next_coder_s lzma_next_coder; typedef struct lzma_next_coder_s lzma_next_coder;
typedef struct lzma_filter_info_s lzma_filter_info; typedef struct lzma_filter_info_s lzma_filter_info;
@ -107,7 +103,7 @@ typedef lzma_ret (*lzma_init_function)(
/// input and output buffers, but for simplicity they still use this same /// input and output buffers, but for simplicity they still use this same
/// function prototype. /// function prototype.
typedef lzma_ret (*lzma_code_function)( typedef lzma_ret (*lzma_code_function)(
lzma_coder *coder, const lzma_allocator *allocator, void *coder, const lzma_allocator *allocator,
const uint8_t *restrict in, size_t *restrict in_pos, const uint8_t *restrict in, size_t *restrict in_pos,
size_t in_size, uint8_t *restrict out, size_t in_size, uint8_t *restrict out,
size_t *restrict out_pos, size_t out_size, size_t *restrict out_pos, size_t out_size,
@ -115,7 +111,7 @@ typedef lzma_ret (*lzma_code_function)(
/// Type of a function to free the memory allocated for the coder /// Type of a function to free the memory allocated for the coder
typedef void (*lzma_end_function)( typedef void (*lzma_end_function)(
lzma_coder *coder, const lzma_allocator *allocator); void *coder, const lzma_allocator *allocator);
/// Raw coder validates and converts an array of lzma_filter structures to /// Raw coder validates and converts an array of lzma_filter structures to
@ -138,7 +134,7 @@ struct lzma_filter_info_s {
/// Hold data and function pointers of the next filter in the chain. /// Hold data and function pointers of the next filter in the chain.
struct lzma_next_coder_s { struct lzma_next_coder_s {
/// Pointer to coder-specific data /// Pointer to coder-specific data
lzma_coder *coder; void *coder;
/// Filter ID. This is LZMA_VLI_UNKNOWN when this structure doesn't /// Filter ID. This is LZMA_VLI_UNKNOWN when this structure doesn't
/// point to a filter coder. /// point to a filter coder.
@ -160,21 +156,21 @@ struct lzma_next_coder_s {
/// Pointer to a function to get progress information. If this is NULL, /// Pointer to a function to get progress information. If this is NULL,
/// lzma_stream.total_in and .total_out are used instead. /// lzma_stream.total_in and .total_out are used instead.
void (*get_progress)(lzma_coder *coder, void (*get_progress)(void *coder,
uint64_t *progress_in, uint64_t *progress_out); uint64_t *progress_in, uint64_t *progress_out);
/// Pointer to function to return the type of the integrity check. /// Pointer to function to return the type of the integrity check.
/// Most coders won't support this. /// Most coders won't support this.
lzma_check (*get_check)(const lzma_coder *coder); lzma_check (*get_check)(const void *coder);
/// Pointer to function to get and/or change the memory usage limit. /// Pointer to function to get and/or change the memory usage limit.
/// If new_memlimit == 0, the limit is not changed. /// If new_memlimit == 0, the limit is not changed.
lzma_ret (*memconfig)(lzma_coder *coder, uint64_t *memusage, lzma_ret (*memconfig)(void *coder, uint64_t *memusage,
uint64_t *old_memlimit, uint64_t new_memlimit); uint64_t *old_memlimit, uint64_t new_memlimit);
/// Update the filter-specific options or the whole filter chain /// Update the filter-specific options or the whole filter chain
/// in the encoder. /// in the encoder.
lzma_ret (*update)(lzma_coder *coder, const lzma_allocator *allocator, lzma_ret (*update)(void *coder, const lzma_allocator *allocator,
const lzma_filter *filters, const lzma_filter *filters,
const lzma_filter *reversed_filters); const lzma_filter *reversed_filters);
}; };

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// //
/// \file filter_common.c /// \file filter_common.h
/// \brief Filter-specific stuff common for both encoder and decoder /// \brief Filter-specific stuff common for both encoder and decoder
// //
// Author: Lasse Collin // Author: Lasse Collin

View File

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// //
/// \file filter_decoder.c /// \file filter_decoder.h
/// \brief Filter ID mapping to filter-specific functions /// \brief Filter ID mapping to filter-specific functions
// //
// Author: Lasse Collin // Author: Lasse Collin

View File

@ -1,7 +1,7 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// //
/// \file filter_flags_encoder.c /// \file filter_flags_encoder.c
/// \brief Decodes a Filter Flags field /// \brief Encodes a Filter Flags field
// //
// Author: Lasse Collin // Author: Lasse Collin
// //

View File

@ -19,7 +19,7 @@ extern LZMA_API(uint64_t)
lzma_physmem(void) lzma_physmem(void)
{ {
// It is simpler to make lzma_physmem() a wrapper for // It is simpler to make lzma_physmem() a wrapper for
// tuklib_physmem() than to hack appropriate symbol visiblity // tuklib_physmem() than to hack appropriate symbol visibility
// support for the tuklib modules. // support for the tuklib modules.
return tuklib_physmem(); return tuklib_physmem();
} }

View File

@ -105,7 +105,7 @@ typedef struct {
typedef struct { typedef struct {
/// Every index_stream is a node in the tree of Sreams. /// Every index_stream is a node in the tree of Streams.
index_tree_node node; index_tree_node node;
/// Number of this Stream (first one is 1) /// Number of this Stream (first one is 1)
@ -166,7 +166,7 @@ struct lzma_index_s {
lzma_vli index_list_size; lzma_vli index_list_size;
/// How many Records to allocate at once in lzma_index_append(). /// How many Records to allocate at once in lzma_index_append().
/// This defaults to INDEX_GROUP_SIZE but can be overriden with /// This defaults to INDEX_GROUP_SIZE but can be overridden with
/// lzma_index_prealloc(). /// lzma_index_prealloc().
size_t prealloc; size_t prealloc;
@ -202,22 +202,21 @@ index_tree_node_end(index_tree_node *node, const lzma_allocator *allocator,
if (node->right != NULL) if (node->right != NULL)
index_tree_node_end(node->right, allocator, free_func); index_tree_node_end(node->right, allocator, free_func);
if (free_func != NULL) free_func(node, allocator);
free_func(node, allocator);
lzma_free(node, allocator);
return; return;
} }
/// Free the meory allocated for a tree. If free_func is not NULL, /// Free the memory allocated for a tree. Each node is freed using the
/// it is called on each node before freeing the node. This is used /// given free_func which is either &lzma_free or &index_stream_end.
/// to free the Record groups from each index_stream before freeing /// The latter is used to free the Record groups from each index_stream
/// the index_stream itself. /// before freeing the index_stream itself.
static void static void
index_tree_end(index_tree *tree, const lzma_allocator *allocator, index_tree_end(index_tree *tree, const lzma_allocator *allocator,
void (*free_func)(void *node, const lzma_allocator *allocator)) void (*free_func)(void *node, const lzma_allocator *allocator))
{ {
assert(free_func != NULL);
if (tree->root != NULL) if (tree->root != NULL)
index_tree_node_end(tree->root, allocator, free_func); index_tree_node_end(tree->root, allocator, free_func);
@ -371,7 +370,8 @@ static void
index_stream_end(void *node, const lzma_allocator *allocator) index_stream_end(void *node, const lzma_allocator *allocator)
{ {
index_stream *s = node; index_stream *s = node;
index_tree_end(&s->groups, allocator, NULL); index_tree_end(&s->groups, allocator, &lzma_free);
lzma_free(s, allocator);
return; return;
} }
@ -825,10 +825,13 @@ lzma_index_cat(lzma_index *restrict dest, lzma_index *restrict src,
s->groups.root = &newg->node; s->groups.root = &newg->node;
} }
if (s->groups.rightmost == &g->node) assert(s->groups.rightmost == &g->node);
s->groups.rightmost = &newg->node; s->groups.rightmost = &newg->node;
lzma_free(g, allocator); lzma_free(g, allocator);
// NOTE: newg isn't leaked here because
// newg == (void *)&newg->node.
} }
} }
@ -869,11 +872,8 @@ index_dup_stream(const index_stream *src, const lzma_allocator *allocator)
index_stream *dest = index_stream_init(src->node.compressed_base, index_stream *dest = index_stream_init(src->node.compressed_base,
src->node.uncompressed_base, src->number, src->node.uncompressed_base, src->number,
src->block_number_base, allocator); src->block_number_base, allocator);
if (dest == NULL)
// Return immediately if allocation failed or if there are return NULL;
// no groups to duplicate.
if (dest == NULL || src->groups.leftmost == NULL)
return dest;
// Copy the overall information. // Copy the overall information.
dest->record_count = src->record_count; dest->record_count = src->record_count;
@ -881,6 +881,10 @@ index_dup_stream(const index_stream *src, const lzma_allocator *allocator)
dest->stream_flags = src->stream_flags; dest->stream_flags = src->stream_flags;
dest->stream_padding = src->stream_padding; dest->stream_padding = src->stream_padding;
// Return if there are no groups to duplicate.
if (src->groups.leftmost == NULL)
return dest;
// Allocate memory for the Records. We put all the Records into // Allocate memory for the Records. We put all the Records into
// a single group. It's simplest and also tends to make // a single group. It's simplest and also tends to make
// lzma_index_locate() a little bit faster with very big Indexes. // lzma_index_locate() a little bit faster with very big Indexes.

View File

@ -14,7 +14,7 @@
#include "check.h" #include "check.h"
struct lzma_coder_s { typedef struct {
enum { enum {
SEQ_INDICATOR, SEQ_INDICATOR,
SEQ_COUNT, SEQ_COUNT,
@ -50,11 +50,11 @@ struct lzma_coder_s {
/// CRC32 of the List of Records field /// CRC32 of the List of Records field
uint32_t crc32; uint32_t crc32;
}; } lzma_index_coder;
static lzma_ret static lzma_ret
index_decode(lzma_coder *coder, const lzma_allocator *allocator, index_decode(void *coder_ptr, const lzma_allocator *allocator,
const uint8_t *restrict in, size_t *restrict in_pos, const uint8_t *restrict in, size_t *restrict in_pos,
size_t in_size, size_t in_size,
uint8_t *restrict out lzma_attribute((__unused__)), uint8_t *restrict out lzma_attribute((__unused__)),
@ -62,6 +62,8 @@ index_decode(lzma_coder *coder, const lzma_allocator *allocator,
size_t out_size lzma_attribute((__unused__)), size_t out_size lzma_attribute((__unused__)),
lzma_action action lzma_attribute((__unused__))) lzma_action action lzma_attribute((__unused__)))
{ {
lzma_index_coder *coder = coder_ptr;
// Similar optimization as in index_encoder.c // Similar optimization as in index_encoder.c
const size_t in_start = *in_pos; const size_t in_start = *in_pos;
lzma_ret ret = LZMA_OK; lzma_ret ret = LZMA_OK;
@ -207,8 +209,9 @@ out:
static void static void
index_decoder_end(lzma_coder *coder, const lzma_allocator *allocator) index_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
{ {
lzma_index_coder *coder = coder_ptr;
lzma_index_end(coder->index, allocator); lzma_index_end(coder->index, allocator);
lzma_free(coder, allocator); lzma_free(coder, allocator);
return; return;
@ -216,9 +219,11 @@ index_decoder_end(lzma_coder *coder, const lzma_allocator *allocator)
static lzma_ret static lzma_ret
index_decoder_memconfig(lzma_coder *coder, uint64_t *memusage, index_decoder_memconfig(void *coder_ptr, uint64_t *memusage,
uint64_t *old_memlimit, uint64_t new_memlimit) uint64_t *old_memlimit, uint64_t new_memlimit)
{ {
lzma_index_coder *coder = coder_ptr;
*memusage = lzma_index_memusage(1, coder->count); *memusage = lzma_index_memusage(1, coder->count);
*old_memlimit = coder->memlimit; *old_memlimit = coder->memlimit;
@ -234,7 +239,7 @@ index_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
static lzma_ret static lzma_ret
index_decoder_reset(lzma_coder *coder, const lzma_allocator *allocator, index_decoder_reset(lzma_index_coder *coder, const lzma_allocator *allocator,
lzma_index **i, uint64_t memlimit) lzma_index **i, uint64_t memlimit)
{ {
// Remember the pointer given by the application. We will set it // Remember the pointer given by the application. We will set it
@ -251,7 +256,7 @@ index_decoder_reset(lzma_coder *coder, const lzma_allocator *allocator,
// Initialize the rest. // Initialize the rest.
coder->sequence = SEQ_INDICATOR; coder->sequence = SEQ_INDICATOR;
coder->memlimit = memlimit; coder->memlimit = my_max(1, memlimit);
coder->count = 0; // Needs to be initialized due to _memconfig(). coder->count = 0; // Needs to be initialized due to _memconfig().
coder->pos = 0; coder->pos = 0;
coder->crc32 = 0; coder->crc32 = 0;
@ -266,23 +271,25 @@ index_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
{ {
lzma_next_coder_init(&index_decoder_init, next, allocator); lzma_next_coder_init(&index_decoder_init, next, allocator);
if (i == NULL || memlimit == 0) if (i == NULL)
return LZMA_PROG_ERROR; return LZMA_PROG_ERROR;
if (next->coder == NULL) { lzma_index_coder *coder = next->coder;
next->coder = lzma_alloc(sizeof(lzma_coder), allocator); if (coder == NULL) {
if (next->coder == NULL) coder = lzma_alloc(sizeof(lzma_index_coder), allocator);
if (coder == NULL)
return LZMA_MEM_ERROR; return LZMA_MEM_ERROR;
next->coder = coder;
next->code = &index_decode; next->code = &index_decode;
next->end = &index_decoder_end; next->end = &index_decoder_end;
next->memconfig = &index_decoder_memconfig; next->memconfig = &index_decoder_memconfig;
next->coder->index = NULL; coder->index = NULL;
} else { } else {
lzma_index_end(next->coder->index, allocator); lzma_index_end(coder->index, allocator);
} }
return index_decoder_reset(next->coder, allocator, i, memlimit); return index_decoder_reset(coder, allocator, i, memlimit);
} }
@ -309,7 +316,7 @@ lzma_index_buffer_decode(lzma_index **i, uint64_t *memlimit,
return LZMA_PROG_ERROR; return LZMA_PROG_ERROR;
// Initialize the decoder. // Initialize the decoder.
lzma_coder coder; lzma_index_coder coder;
return_if_error(index_decoder_reset(&coder, allocator, i, *memlimit)); return_if_error(index_decoder_reset(&coder, allocator, i, *memlimit));
// Store the input start position so that we can restore it in case // Store the input start position so that we can restore it in case

View File

@ -15,7 +15,7 @@
#include "check.h" #include "check.h"
struct lzma_coder_s { typedef struct {
enum { enum {
SEQ_INDICATOR, SEQ_INDICATOR,
SEQ_COUNT, SEQ_COUNT,
@ -37,11 +37,11 @@ struct lzma_coder_s {
/// CRC32 of the List of Records field /// CRC32 of the List of Records field
uint32_t crc32; uint32_t crc32;
}; } lzma_index_coder;
static lzma_ret static lzma_ret
index_encode(lzma_coder *coder, index_encode(void *coder_ptr,
const lzma_allocator *allocator lzma_attribute((__unused__)), const lzma_allocator *allocator lzma_attribute((__unused__)),
const uint8_t *restrict in lzma_attribute((__unused__)), const uint8_t *restrict in lzma_attribute((__unused__)),
size_t *restrict in_pos lzma_attribute((__unused__)), size_t *restrict in_pos lzma_attribute((__unused__)),
@ -50,6 +50,8 @@ index_encode(lzma_coder *coder,
size_t out_size, size_t out_size,
lzma_action action lzma_attribute((__unused__))) lzma_action action lzma_attribute((__unused__)))
{ {
lzma_index_coder *coder = coder_ptr;
// Position where to start calculating CRC32. The idea is that we // Position where to start calculating CRC32. The idea is that we
// need to call lzma_crc32() only once per call to index_encode(). // need to call lzma_crc32() only once per call to index_encode().
const size_t out_start = *out_pos; const size_t out_start = *out_pos;
@ -159,7 +161,7 @@ out:
static void static void
index_encoder_end(lzma_coder *coder, const lzma_allocator *allocator) index_encoder_end(void *coder, const lzma_allocator *allocator)
{ {
lzma_free(coder, allocator); lzma_free(coder, allocator);
return; return;
@ -167,7 +169,7 @@ index_encoder_end(lzma_coder *coder, const lzma_allocator *allocator)
static void static void
index_encoder_reset(lzma_coder *coder, const lzma_index *i) index_encoder_reset(lzma_index_coder *coder, const lzma_index *i)
{ {
lzma_index_iter_init(&coder->iter, i); lzma_index_iter_init(&coder->iter, i);
@ -190,7 +192,7 @@ lzma_index_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
return LZMA_PROG_ERROR; return LZMA_PROG_ERROR;
if (next->coder == NULL) { if (next->coder == NULL) {
next->coder = lzma_alloc(sizeof(lzma_coder), allocator); next->coder = lzma_alloc(sizeof(lzma_index_coder), allocator);
if (next->coder == NULL) if (next->coder == NULL)
return LZMA_MEM_ERROR; return LZMA_MEM_ERROR;
@ -230,7 +232,7 @@ lzma_index_buffer_encode(const lzma_index *i,
// The Index encoder needs just one small data structure so we can // The Index encoder needs just one small data structure so we can
// allocate it on stack. // allocate it on stack.
lzma_coder coder; lzma_index_coder coder;
index_encoder_reset(&coder, i); index_encoder_reset(&coder, i);
// Do the actual encoding. This should never fail, but store // Do the actual encoding. This should never fail, but store

View File

@ -61,8 +61,7 @@ lzma_memcmplen(const uint8_t *buf1, const uint8_t *buf2,
// to __builtin_clzll(). // to __builtin_clzll().
#define LZMA_MEMCMPLEN_EXTRA 8 #define LZMA_MEMCMPLEN_EXTRA 8
while (len < limit) { while (len < limit) {
const uint64_t x = *(const uint64_t *)(buf1 + len) const uint64_t x = read64ne(buf1 + len) - read64ne(buf2 + len);
- *(const uint64_t *)(buf2 + len);
if (x != 0) { if (x != 0) {
# if defined(_M_X64) // MSVC or Intel C compiler on Windows # if defined(_M_X64) // MSVC or Intel C compiler on Windows
unsigned long tmp; unsigned long tmp;
@ -99,15 +98,7 @@ lzma_memcmplen(const uint8_t *buf1, const uint8_t *buf2,
_mm_loadu_si128((const __m128i *)(buf2 + len)))); _mm_loadu_si128((const __m128i *)(buf2 + len))));
if (x != 0) { if (x != 0) {
# if defined(__INTEL_COMPILER) len += ctz32(x);
len += _bit_scan_forward(x);
# elif defined(_MSC_VER)
unsigned long tmp;
_BitScanForward(&tmp, x);
len += tmp;
# else
len += __builtin_ctz(x);
# endif
return my_min(len, limit); return my_min(len, limit);
} }
@ -120,8 +111,7 @@ lzma_memcmplen(const uint8_t *buf1, const uint8_t *buf2,
// Generic 32-bit little endian method // Generic 32-bit little endian method
# define LZMA_MEMCMPLEN_EXTRA 4 # define LZMA_MEMCMPLEN_EXTRA 4
while (len < limit) { while (len < limit) {
uint32_t x = *(const uint32_t *)(buf1 + len) uint32_t x = read32ne(buf1 + len) - read32ne(buf2 + len);
- *(const uint32_t *)(buf2 + len);
if (x != 0) { if (x != 0) {
if ((x & 0xFFFF) == 0) { if ((x & 0xFFFF) == 0) {
len += 2; len += 2;
@ -143,8 +133,7 @@ lzma_memcmplen(const uint8_t *buf1, const uint8_t *buf2,
// Generic 32-bit big endian method // Generic 32-bit big endian method
# define LZMA_MEMCMPLEN_EXTRA 4 # define LZMA_MEMCMPLEN_EXTRA 4
while (len < limit) { while (len < limit) {
uint32_t x = *(const uint32_t *)(buf1 + len) uint32_t x = read32ne(buf1 + len) ^ read32ne(buf2 + len);
^ *(const uint32_t *)(buf2 + len);
if (x != 0) { if (x != 0) {
if ((x & 0xFFFF0000) == 0) { if ((x & 0xFFFF0000) == 0) {
len += 2; len += 2;

View File

@ -14,7 +14,7 @@
#include "block_decoder.h" #include "block_decoder.h"
struct lzma_coder_s { typedef struct {
enum { enum {
SEQ_STREAM_HEADER, SEQ_STREAM_HEADER,
SEQ_BLOCK_HEADER, SEQ_BLOCK_HEADER,
@ -80,11 +80,11 @@ struct lzma_coder_s {
/// Buffer to hold Stream Header, Block Header, and Stream Footer. /// Buffer to hold Stream Header, Block Header, and Stream Footer.
/// Block Header has biggest maximum size. /// Block Header has biggest maximum size.
uint8_t buffer[LZMA_BLOCK_HEADER_SIZE_MAX]; uint8_t buffer[LZMA_BLOCK_HEADER_SIZE_MAX];
}; } lzma_stream_coder;
static lzma_ret static lzma_ret
stream_decoder_reset(lzma_coder *coder, const lzma_allocator *allocator) stream_decoder_reset(lzma_stream_coder *coder, const lzma_allocator *allocator)
{ {
// Initialize the Index hash used to verify the Index. // Initialize the Index hash used to verify the Index.
coder->index_hash = lzma_index_hash_init(coder->index_hash, allocator); coder->index_hash = lzma_index_hash_init(coder->index_hash, allocator);
@ -100,11 +100,13 @@ stream_decoder_reset(lzma_coder *coder, const lzma_allocator *allocator)
static lzma_ret static lzma_ret
stream_decode(lzma_coder *coder, const lzma_allocator *allocator, stream_decode(void *coder_ptr, const lzma_allocator *allocator,
const uint8_t *restrict in, size_t *restrict in_pos, const uint8_t *restrict in, size_t *restrict in_pos,
size_t in_size, uint8_t *restrict out, size_t in_size, uint8_t *restrict out,
size_t *restrict out_pos, size_t out_size, lzma_action action) size_t *restrict out_pos, size_t out_size, lzma_action action)
{ {
lzma_stream_coder *coder = coder_ptr;
// When decoding the actual Block, it may be able to produce more // When decoding the actual Block, it may be able to produce more
// output even if we don't give it any new input. // output even if we don't give it any new input.
while (true) while (true)
@ -375,8 +377,9 @@ stream_decode(lzma_coder *coder, const lzma_allocator *allocator,
static void static void
stream_decoder_end(lzma_coder *coder, const lzma_allocator *allocator) stream_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
{ {
lzma_stream_coder *coder = coder_ptr;
lzma_next_end(&coder->block_decoder, allocator); lzma_next_end(&coder->block_decoder, allocator);
lzma_index_hash_end(coder->index_hash, allocator); lzma_index_hash_end(coder->index_hash, allocator);
lzma_free(coder, allocator); lzma_free(coder, allocator);
@ -385,16 +388,19 @@ stream_decoder_end(lzma_coder *coder, const lzma_allocator *allocator)
static lzma_check static lzma_check
stream_decoder_get_check(const lzma_coder *coder) stream_decoder_get_check(const void *coder_ptr)
{ {
const lzma_stream_coder *coder = coder_ptr;
return coder->stream_flags.check; return coder->stream_flags.check;
} }
static lzma_ret static lzma_ret
stream_decoder_memconfig(lzma_coder *coder, uint64_t *memusage, stream_decoder_memconfig(void *coder_ptr, uint64_t *memusage,
uint64_t *old_memlimit, uint64_t new_memlimit) uint64_t *old_memlimit, uint64_t new_memlimit)
{ {
lzma_stream_coder *coder = coder_ptr;
*memusage = coder->memusage; *memusage = coder->memusage;
*old_memlimit = coder->memlimit; *old_memlimit = coder->memlimit;
@ -416,37 +422,36 @@ lzma_stream_decoder_init(
{ {
lzma_next_coder_init(&lzma_stream_decoder_init, next, allocator); lzma_next_coder_init(&lzma_stream_decoder_init, next, allocator);
if (memlimit == 0)
return LZMA_PROG_ERROR;
if (flags & ~LZMA_SUPPORTED_FLAGS) if (flags & ~LZMA_SUPPORTED_FLAGS)
return LZMA_OPTIONS_ERROR; return LZMA_OPTIONS_ERROR;
if (next->coder == NULL) { lzma_stream_coder *coder = next->coder;
next->coder = lzma_alloc(sizeof(lzma_coder), allocator); if (coder == NULL) {
if (next->coder == NULL) coder = lzma_alloc(sizeof(lzma_stream_coder), allocator);
if (coder == NULL)
return LZMA_MEM_ERROR; return LZMA_MEM_ERROR;
next->coder = coder;
next->code = &stream_decode; next->code = &stream_decode;
next->end = &stream_decoder_end; next->end = &stream_decoder_end;
next->get_check = &stream_decoder_get_check; next->get_check = &stream_decoder_get_check;
next->memconfig = &stream_decoder_memconfig; next->memconfig = &stream_decoder_memconfig;
next->coder->block_decoder = LZMA_NEXT_CODER_INIT; coder->block_decoder = LZMA_NEXT_CODER_INIT;
next->coder->index_hash = NULL; coder->index_hash = NULL;
} }
next->coder->memlimit = memlimit; coder->memlimit = my_max(1, memlimit);
next->coder->memusage = LZMA_MEMUSAGE_BASE; coder->memusage = LZMA_MEMUSAGE_BASE;
next->coder->tell_no_check = (flags & LZMA_TELL_NO_CHECK) != 0; coder->tell_no_check = (flags & LZMA_TELL_NO_CHECK) != 0;
next->coder->tell_unsupported_check coder->tell_unsupported_check
= (flags & LZMA_TELL_UNSUPPORTED_CHECK) != 0; = (flags & LZMA_TELL_UNSUPPORTED_CHECK) != 0;
next->coder->tell_any_check = (flags & LZMA_TELL_ANY_CHECK) != 0; coder->tell_any_check = (flags & LZMA_TELL_ANY_CHECK) != 0;
next->coder->ignore_check = (flags & LZMA_IGNORE_CHECK) != 0; coder->ignore_check = (flags & LZMA_IGNORE_CHECK) != 0;
next->coder->concatenated = (flags & LZMA_CONCATENATED) != 0; coder->concatenated = (flags & LZMA_CONCATENATED) != 0;
next->coder->first_stream = true; coder->first_stream = true;
return stream_decoder_reset(next->coder, allocator); return stream_decoder_reset(coder, allocator);
} }

View File

@ -14,7 +14,7 @@
#include "index_encoder.h" #include "index_encoder.h"
struct lzma_coder_s { typedef struct {
enum { enum {
SEQ_STREAM_HEADER, SEQ_STREAM_HEADER,
SEQ_BLOCK_INIT, SEQ_BLOCK_INIT,
@ -55,11 +55,11 @@ struct lzma_coder_s {
/// Buffer to hold Stream Header, Block Header, and Stream Footer. /// Buffer to hold Stream Header, Block Header, and Stream Footer.
/// Block Header has biggest maximum size. /// Block Header has biggest maximum size.
uint8_t buffer[LZMA_BLOCK_HEADER_SIZE_MAX]; uint8_t buffer[LZMA_BLOCK_HEADER_SIZE_MAX];
}; } lzma_stream_coder;
static lzma_ret static lzma_ret
block_encoder_init(lzma_coder *coder, const lzma_allocator *allocator) block_encoder_init(lzma_stream_coder *coder, const lzma_allocator *allocator)
{ {
// Prepare the Block options. Even though Block encoder doesn't need // Prepare the Block options. Even though Block encoder doesn't need
// compressed_size, uncompressed_size, and header_size to be // compressed_size, uncompressed_size, and header_size to be
@ -78,11 +78,13 @@ block_encoder_init(lzma_coder *coder, const lzma_allocator *allocator)
static lzma_ret static lzma_ret
stream_encode(lzma_coder *coder, const lzma_allocator *allocator, stream_encode(void *coder_ptr, const lzma_allocator *allocator,
const uint8_t *restrict in, size_t *restrict in_pos, const uint8_t *restrict in, size_t *restrict in_pos,
size_t in_size, uint8_t *restrict out, size_t in_size, uint8_t *restrict out,
size_t *restrict out_pos, size_t out_size, lzma_action action) size_t *restrict out_pos, size_t out_size, lzma_action action)
{ {
lzma_stream_coder *coder = coder_ptr;
// Main loop // Main loop
while (*out_pos < out_size) while (*out_pos < out_size)
switch (coder->sequence) { switch (coder->sequence) {
@ -209,8 +211,10 @@ stream_encode(lzma_coder *coder, const lzma_allocator *allocator,
static void static void
stream_encoder_end(lzma_coder *coder, const lzma_allocator *allocator) stream_encoder_end(void *coder_ptr, const lzma_allocator *allocator)
{ {
lzma_stream_coder *coder = coder_ptr;
lzma_next_end(&coder->block_encoder, allocator); lzma_next_end(&coder->block_encoder, allocator);
lzma_next_end(&coder->index_encoder, allocator); lzma_next_end(&coder->index_encoder, allocator);
lzma_index_end(coder->index, allocator); lzma_index_end(coder->index, allocator);
@ -224,10 +228,12 @@ stream_encoder_end(lzma_coder *coder, const lzma_allocator *allocator)
static lzma_ret static lzma_ret
stream_encoder_update(lzma_coder *coder, const lzma_allocator *allocator, stream_encoder_update(void *coder_ptr, const lzma_allocator *allocator,
const lzma_filter *filters, const lzma_filter *filters,
const lzma_filter *reversed_filters) const lzma_filter *reversed_filters)
{ {
lzma_stream_coder *coder = coder_ptr;
if (coder->sequence <= SEQ_BLOCK_INIT) { if (coder->sequence <= SEQ_BLOCK_INIT) {
// There is no incomplete Block waiting to be finished, // There is no incomplete Block waiting to be finished,
// thus we can change the whole filter chain. Start by // thus we can change the whole filter chain. Start by
@ -271,30 +277,33 @@ stream_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
if (filters == NULL) if (filters == NULL)
return LZMA_PROG_ERROR; return LZMA_PROG_ERROR;
if (next->coder == NULL) { lzma_stream_coder *coder = next->coder;
next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
if (next->coder == NULL) if (coder == NULL) {
coder = lzma_alloc(sizeof(lzma_stream_coder), allocator);
if (coder == NULL)
return LZMA_MEM_ERROR; return LZMA_MEM_ERROR;
next->coder = coder;
next->code = &stream_encode; next->code = &stream_encode;
next->end = &stream_encoder_end; next->end = &stream_encoder_end;
next->update = &stream_encoder_update; next->update = &stream_encoder_update;
next->coder->filters[0].id = LZMA_VLI_UNKNOWN; coder->filters[0].id = LZMA_VLI_UNKNOWN;
next->coder->block_encoder = LZMA_NEXT_CODER_INIT; coder->block_encoder = LZMA_NEXT_CODER_INIT;
next->coder->index_encoder = LZMA_NEXT_CODER_INIT; coder->index_encoder = LZMA_NEXT_CODER_INIT;
next->coder->index = NULL; coder->index = NULL;
} }
// Basic initializations // Basic initializations
next->coder->sequence = SEQ_STREAM_HEADER; coder->sequence = SEQ_STREAM_HEADER;
next->coder->block_options.version = 0; coder->block_options.version = 0;
next->coder->block_options.check = check; coder->block_options.check = check;
// Initialize the Index // Initialize the Index
lzma_index_end(next->coder->index, allocator); lzma_index_end(coder->index, allocator);
next->coder->index = lzma_index_init(allocator); coder->index = lzma_index_init(allocator);
if (next->coder->index == NULL) if (coder->index == NULL)
return LZMA_MEM_ERROR; return LZMA_MEM_ERROR;
// Encode the Stream Header // Encode the Stream Header
@ -303,16 +312,15 @@ stream_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
.check = check, .check = check,
}; };
return_if_error(lzma_stream_header_encode( return_if_error(lzma_stream_header_encode(
&stream_flags, next->coder->buffer)); &stream_flags, coder->buffer));
next->coder->buffer_pos = 0; coder->buffer_pos = 0;
next->coder->buffer_size = LZMA_STREAM_HEADER_SIZE; coder->buffer_size = LZMA_STREAM_HEADER_SIZE;
// Initialize the Block encoder. This way we detect unsupported // Initialize the Block encoder. This way we detect unsupported
// filter chains when initializing the Stream encoder instead of // filter chains when initializing the Stream encoder instead of
// giving an error after Stream Header has already written out. // giving an error after Stream Header has already written out.
return stream_encoder_update( return stream_encoder_update(coder, allocator, filters, NULL);
next->coder, allocator, filters, NULL);
} }

View File

@ -44,6 +44,7 @@ typedef enum {
} worker_state; } worker_state;
typedef struct lzma_stream_coder_s lzma_stream_coder;
typedef struct worker_thread_s worker_thread; typedef struct worker_thread_s worker_thread;
struct worker_thread_s { struct worker_thread_s {
@ -65,7 +66,7 @@ struct worker_thread_s {
/// Pointer to the main structure is needed when putting this /// Pointer to the main structure is needed when putting this
/// thread back to the stack of free threads. /// thread back to the stack of free threads.
lzma_coder *coder; lzma_stream_coder *coder;
/// The allocator is set by the main thread. Since a copy of the /// The allocator is set by the main thread. Since a copy of the
/// pointer is kept here, the application must not change the /// pointer is kept here, the application must not change the
@ -96,7 +97,7 @@ struct worker_thread_s {
}; };
struct lzma_coder_s { struct lzma_stream_coder_s {
enum { enum {
SEQ_STREAM_HEADER, SEQ_STREAM_HEADER,
SEQ_BLOCK, SEQ_BLOCK,
@ -417,7 +418,7 @@ worker_start(void *thr_ptr)
/// Make the threads stop but not exit. Optionally wait for them to stop. /// Make the threads stop but not exit. Optionally wait for them to stop.
static void static void
threads_stop(lzma_coder *coder, bool wait_for_threads) threads_stop(lzma_stream_coder *coder, bool wait_for_threads)
{ {
// Tell the threads to stop. // Tell the threads to stop.
for (uint32_t i = 0; i < coder->threads_initialized; ++i) { for (uint32_t i = 0; i < coder->threads_initialized; ++i) {
@ -446,7 +447,7 @@ threads_stop(lzma_coder *coder, bool wait_for_threads)
/// Stop the threads and free the resources associated with them. /// Stop the threads and free the resources associated with them.
/// Wait until the threads have exited. /// Wait until the threads have exited.
static void static void
threads_end(lzma_coder *coder, const lzma_allocator *allocator) threads_end(lzma_stream_coder *coder, const lzma_allocator *allocator)
{ {
for (uint32_t i = 0; i < coder->threads_initialized; ++i) { for (uint32_t i = 0; i < coder->threads_initialized; ++i) {
mythread_sync(coder->threads[i].mutex) { mythread_sync(coder->threads[i].mutex) {
@ -468,7 +469,8 @@ threads_end(lzma_coder *coder, const lzma_allocator *allocator)
/// Initialize a new worker_thread structure and create a new thread. /// Initialize a new worker_thread structure and create a new thread.
static lzma_ret static lzma_ret
initialize_new_thread(lzma_coder *coder, const lzma_allocator *allocator) initialize_new_thread(lzma_stream_coder *coder,
const lzma_allocator *allocator)
{ {
worker_thread *thr = &coder->threads[coder->threads_initialized]; worker_thread *thr = &coder->threads[coder->threads_initialized];
@ -510,7 +512,7 @@ error_mutex:
static lzma_ret static lzma_ret
get_thread(lzma_coder *coder, const lzma_allocator *allocator) get_thread(lzma_stream_coder *coder, const lzma_allocator *allocator)
{ {
// If there are no free output subqueues, there is no // If there are no free output subqueues, there is no
// point to try getting a thread. // point to try getting a thread.
@ -548,7 +550,7 @@ get_thread(lzma_coder *coder, const lzma_allocator *allocator)
static lzma_ret static lzma_ret
stream_encode_in(lzma_coder *coder, const lzma_allocator *allocator, stream_encode_in(lzma_stream_coder *coder, const lzma_allocator *allocator,
const uint8_t *restrict in, size_t *restrict in_pos, const uint8_t *restrict in, size_t *restrict in_pos,
size_t in_size, lzma_action action) size_t in_size, lzma_action action)
{ {
@ -616,7 +618,7 @@ stream_encode_in(lzma_coder *coder, const lzma_allocator *allocator,
/// Wait until more input can be consumed, more output can be read, or /// Wait until more input can be consumed, more output can be read, or
/// an optional timeout is reached. /// an optional timeout is reached.
static bool static bool
wait_for_work(lzma_coder *coder, mythread_condtime *wait_abs, wait_for_work(lzma_stream_coder *coder, mythread_condtime *wait_abs,
bool *has_blocked, bool has_input) bool *has_blocked, bool has_input)
{ {
if (coder->timeout != 0 && !*has_blocked) { if (coder->timeout != 0 && !*has_blocked) {
@ -662,11 +664,13 @@ wait_for_work(lzma_coder *coder, mythread_condtime *wait_abs,
static lzma_ret static lzma_ret
stream_encode_mt(lzma_coder *coder, const lzma_allocator *allocator, stream_encode_mt(void *coder_ptr, const lzma_allocator *allocator,
const uint8_t *restrict in, size_t *restrict in_pos, const uint8_t *restrict in, size_t *restrict in_pos,
size_t in_size, uint8_t *restrict out, size_t in_size, uint8_t *restrict out,
size_t *restrict out_pos, size_t out_size, lzma_action action) size_t *restrict out_pos, size_t out_size, lzma_action action)
{ {
lzma_stream_coder *coder = coder_ptr;
switch (coder->sequence) { switch (coder->sequence) {
case SEQ_STREAM_HEADER: case SEQ_STREAM_HEADER:
lzma_bufcpy(coder->header, &coder->header_pos, lzma_bufcpy(coder->header, &coder->header_pos,
@ -696,7 +700,7 @@ stream_encode_mt(lzma_coder *coder, const lzma_allocator *allocator,
ret = coder->thread_error; ret = coder->thread_error;
if (ret != LZMA_OK) { if (ret != LZMA_OK) {
assert(ret != LZMA_STREAM_END); assert(ret != LZMA_STREAM_END);
break; break; // Break out of mythread_sync.
} }
// Try to read compressed data to out[]. // Try to read compressed data to out[].
@ -834,8 +838,10 @@ stream_encode_mt(lzma_coder *coder, const lzma_allocator *allocator,
static void static void
stream_encoder_mt_end(lzma_coder *coder, const lzma_allocator *allocator) stream_encoder_mt_end(void *coder_ptr, const lzma_allocator *allocator)
{ {
lzma_stream_coder *coder = coder_ptr;
// Threads must be killed before the output queue can be freed. // Threads must be killed before the output queue can be freed.
threads_end(coder, allocator); threads_end(coder, allocator);
lzma_outq_end(&coder->outq, allocator); lzma_outq_end(&coder->outq, allocator);
@ -907,10 +913,12 @@ get_options(const lzma_mt *options, lzma_options_easy *opt_easy,
static void static void
get_progress(lzma_coder *coder, uint64_t *progress_in, uint64_t *progress_out) get_progress(void *coder_ptr, uint64_t *progress_in, uint64_t *progress_out)
{ {
lzma_stream_coder *coder = coder_ptr;
// Lock coder->mutex to prevent finishing threads from moving their // Lock coder->mutex to prevent finishing threads from moving their
// progress info from the worker_thread structure to lzma_coder. // progress info from the worker_thread structure to lzma_stream_coder.
mythread_sync(coder->mutex) { mythread_sync(coder->mutex) {
*progress_in = coder->progress_in; *progress_in = coder->progress_in;
*progress_out = coder->progress_out; *progress_out = coder->progress_out;
@ -950,7 +958,7 @@ stream_encoder_mt_init(lzma_next_coder *next, const lzma_allocator *allocator,
// Validate the filter chain so that we can give an error in this // Validate the filter chain so that we can give an error in this
// function instead of delaying it to the first call to lzma_code(). // function instead of delaying it to the first call to lzma_code().
// The memory usage calculation verifies the filter chain as // The memory usage calculation verifies the filter chain as
// a side effect so we take advatange of that. // a side effect so we take advantage of that.
if (lzma_raw_encoder_memusage(filters) == UINT64_MAX) if (lzma_raw_encoder_memusage(filters) == UINT64_MAX)
return LZMA_OPTIONS_ERROR; return LZMA_OPTIONS_ERROR;
@ -962,24 +970,27 @@ stream_encoder_mt_init(lzma_next_coder *next, const lzma_allocator *allocator,
return LZMA_UNSUPPORTED_CHECK; return LZMA_UNSUPPORTED_CHECK;
// Allocate and initialize the base structure if needed. // Allocate and initialize the base structure if needed.
if (next->coder == NULL) { lzma_stream_coder *coder = next->coder;
next->coder = lzma_alloc(sizeof(lzma_coder), allocator); if (coder == NULL) {
if (next->coder == NULL) coder = lzma_alloc(sizeof(lzma_stream_coder), allocator);
if (coder == NULL)
return LZMA_MEM_ERROR; return LZMA_MEM_ERROR;
next->coder = coder;
// For the mutex and condition variable initializations // For the mutex and condition variable initializations
// the error handling has to be done here because // the error handling has to be done here because
// stream_encoder_mt_end() doesn't know if they have // stream_encoder_mt_end() doesn't know if they have
// already been initialized or not. // already been initialized or not.
if (mythread_mutex_init(&next->coder->mutex)) { if (mythread_mutex_init(&coder->mutex)) {
lzma_free(next->coder, allocator); lzma_free(coder, allocator);
next->coder = NULL; next->coder = NULL;
return LZMA_MEM_ERROR; return LZMA_MEM_ERROR;
} }
if (mythread_cond_init(&next->coder->cond)) { if (mythread_cond_init(&coder->cond)) {
mythread_mutex_destroy(&next->coder->mutex); mythread_mutex_destroy(&coder->mutex);
lzma_free(next->coder, allocator); lzma_free(coder, allocator);
next->coder = NULL; next->coder = NULL;
return LZMA_MEM_ERROR; return LZMA_MEM_ERROR;
} }
@ -989,76 +1000,76 @@ stream_encoder_mt_init(lzma_next_coder *next, const lzma_allocator *allocator,
next->get_progress = &get_progress; next->get_progress = &get_progress;
// next->update = &stream_encoder_mt_update; // next->update = &stream_encoder_mt_update;
next->coder->filters[0].id = LZMA_VLI_UNKNOWN; coder->filters[0].id = LZMA_VLI_UNKNOWN;
next->coder->index_encoder = LZMA_NEXT_CODER_INIT; coder->index_encoder = LZMA_NEXT_CODER_INIT;
next->coder->index = NULL; coder->index = NULL;
memzero(&next->coder->outq, sizeof(next->coder->outq)); memzero(&coder->outq, sizeof(coder->outq));
next->coder->threads = NULL; coder->threads = NULL;
next->coder->threads_max = 0; coder->threads_max = 0;
next->coder->threads_initialized = 0; coder->threads_initialized = 0;
} }
// Basic initializations // Basic initializations
next->coder->sequence = SEQ_STREAM_HEADER; coder->sequence = SEQ_STREAM_HEADER;
next->coder->block_size = (size_t)(block_size); coder->block_size = (size_t)(block_size);
next->coder->thread_error = LZMA_OK; coder->thread_error = LZMA_OK;
next->coder->thr = NULL; coder->thr = NULL;
// Allocate the thread-specific base structures. // Allocate the thread-specific base structures.
assert(options->threads > 0); assert(options->threads > 0);
if (next->coder->threads_max != options->threads) { if (coder->threads_max != options->threads) {
threads_end(next->coder, allocator); threads_end(coder, allocator);
next->coder->threads = NULL; coder->threads = NULL;
next->coder->threads_max = 0; coder->threads_max = 0;
next->coder->threads_initialized = 0; coder->threads_initialized = 0;
next->coder->threads_free = NULL; coder->threads_free = NULL;
next->coder->threads = lzma_alloc( coder->threads = lzma_alloc(
options->threads * sizeof(worker_thread), options->threads * sizeof(worker_thread),
allocator); allocator);
if (next->coder->threads == NULL) if (coder->threads == NULL)
return LZMA_MEM_ERROR; return LZMA_MEM_ERROR;
next->coder->threads_max = options->threads; coder->threads_max = options->threads;
} else { } else {
// Reuse the old structures and threads. Tell the running // Reuse the old structures and threads. Tell the running
// threads to stop and wait until they have stopped. // threads to stop and wait until they have stopped.
threads_stop(next->coder, true); threads_stop(coder, true);
} }
// Output queue // Output queue
return_if_error(lzma_outq_init(&next->coder->outq, allocator, return_if_error(lzma_outq_init(&coder->outq, allocator,
outbuf_size_max, options->threads)); outbuf_size_max, options->threads));
// Timeout // Timeout
next->coder->timeout = options->timeout; coder->timeout = options->timeout;
// Free the old filter chain and copy the new one. // Free the old filter chain and copy the new one.
for (size_t i = 0; next->coder->filters[i].id != LZMA_VLI_UNKNOWN; ++i) for (size_t i = 0; coder->filters[i].id != LZMA_VLI_UNKNOWN; ++i)
lzma_free(next->coder->filters[i].options, allocator); lzma_free(coder->filters[i].options, allocator);
return_if_error(lzma_filters_copy( return_if_error(lzma_filters_copy(
filters, next->coder->filters, allocator)); filters, coder->filters, allocator));
// Index // Index
lzma_index_end(next->coder->index, allocator); lzma_index_end(coder->index, allocator);
next->coder->index = lzma_index_init(allocator); coder->index = lzma_index_init(allocator);
if (next->coder->index == NULL) if (coder->index == NULL)
return LZMA_MEM_ERROR; return LZMA_MEM_ERROR;
// Stream Header // Stream Header
next->coder->stream_flags.version = 0; coder->stream_flags.version = 0;
next->coder->stream_flags.check = options->check; coder->stream_flags.check = options->check;
return_if_error(lzma_stream_header_encode( return_if_error(lzma_stream_header_encode(
&next->coder->stream_flags, next->coder->header)); &coder->stream_flags, coder->header));
next->coder->header_pos = 0; coder->header_pos = 0;
// Progress info // Progress info
next->coder->progress_in = 0; coder->progress_in = 0;
next->coder->progress_out = LZMA_STREAM_HEADER_SIZE; coder->progress_out = LZMA_STREAM_HEADER_SIZE;
return LZMA_OK; return LZMA_OK;
} }
@ -1111,7 +1122,8 @@ lzma_stream_encoder_mt_memusage(const lzma_mt *options)
return UINT64_MAX; return UINT64_MAX;
// Sum them with overflow checking. // Sum them with overflow checking.
uint64_t total_memusage = LZMA_MEMUSAGE_BASE + sizeof(lzma_coder) uint64_t total_memusage = LZMA_MEMUSAGE_BASE
+ sizeof(lzma_stream_coder)
+ options->threads * sizeof(worker_thread); + options->threads * sizeof(worker_thread);
if (UINT64_MAX - total_memusage < inbuf_memusage) if (UINT64_MAX - total_memusage < inbuf_memusage)

View File

@ -38,7 +38,7 @@ lzma_stream_header_decode(lzma_stream_flags *options, const uint8_t *in)
// and unsupported files. // and unsupported files.
const uint32_t crc = lzma_crc32(in + sizeof(lzma_header_magic), const uint32_t crc = lzma_crc32(in + sizeof(lzma_header_magic),
LZMA_STREAM_FLAGS_SIZE, 0); LZMA_STREAM_FLAGS_SIZE, 0);
if (crc != unaligned_read32le(in + sizeof(lzma_header_magic) if (crc != read32le(in + sizeof(lzma_header_magic)
+ LZMA_STREAM_FLAGS_SIZE)) + LZMA_STREAM_FLAGS_SIZE))
return LZMA_DATA_ERROR; return LZMA_DATA_ERROR;
@ -67,7 +67,7 @@ lzma_stream_footer_decode(lzma_stream_flags *options, const uint8_t *in)
// CRC32 // CRC32
const uint32_t crc = lzma_crc32(in + sizeof(uint32_t), const uint32_t crc = lzma_crc32(in + sizeof(uint32_t),
sizeof(uint32_t) + LZMA_STREAM_FLAGS_SIZE, 0); sizeof(uint32_t) + LZMA_STREAM_FLAGS_SIZE, 0);
if (crc != unaligned_read32le(in)) if (crc != read32le(in))
return LZMA_DATA_ERROR; return LZMA_DATA_ERROR;
// Stream Flags // Stream Flags
@ -75,7 +75,7 @@ lzma_stream_footer_decode(lzma_stream_flags *options, const uint8_t *in)
return LZMA_OPTIONS_ERROR; return LZMA_OPTIONS_ERROR;
// Backward Size // Backward Size
options->backward_size = unaligned_read32le(in + sizeof(uint32_t)); options->backward_size = read32le(in + sizeof(uint32_t));
options->backward_size = (options->backward_size + 1) * 4; options->backward_size = (options->backward_size + 1) * 4;
return LZMA_OK; return LZMA_OK;

View File

@ -46,8 +46,8 @@ lzma_stream_header_encode(const lzma_stream_flags *options, uint8_t *out)
const uint32_t crc = lzma_crc32(out + sizeof(lzma_header_magic), const uint32_t crc = lzma_crc32(out + sizeof(lzma_header_magic),
LZMA_STREAM_FLAGS_SIZE, 0); LZMA_STREAM_FLAGS_SIZE, 0);
unaligned_write32le(out + sizeof(lzma_header_magic) write32le(out + sizeof(lzma_header_magic) + LZMA_STREAM_FLAGS_SIZE,
+ LZMA_STREAM_FLAGS_SIZE, crc); crc);
return LZMA_OK; return LZMA_OK;
} }
@ -66,7 +66,7 @@ lzma_stream_footer_encode(const lzma_stream_flags *options, uint8_t *out)
if (!is_backward_size_valid(options)) if (!is_backward_size_valid(options))
return LZMA_PROG_ERROR; return LZMA_PROG_ERROR;
unaligned_write32le(out + 4, options->backward_size / 4 - 1); write32le(out + 4, options->backward_size / 4 - 1);
// Stream Flags // Stream Flags
if (stream_flags_encode(options, out + 2 * 4)) if (stream_flags_encode(options, out + 2 * 4))
@ -76,7 +76,7 @@ lzma_stream_footer_encode(const lzma_stream_flags *options, uint8_t *out)
const uint32_t crc = lzma_crc32( const uint32_t crc = lzma_crc32(
out + 4, 4 + LZMA_STREAM_FLAGS_SIZE, 0); out + 4, 4 + LZMA_STREAM_FLAGS_SIZE, 0);
unaligned_write32le(out, crc); write32le(out, crc);
// Magic // Magic
memcpy(out + 2 * 4 + LZMA_STREAM_FLAGS_SIZE, memcpy(out + 2 * 4 + LZMA_STREAM_FLAGS_SIZE,

View File

@ -72,7 +72,7 @@ lzma_vli_decode(lzma_vli *restrict vli, size_t *vli_pos,
// corrupt. // corrupt.
// //
// If we need bigger integers in future, old versions liblzma // If we need bigger integers in future, old versions liblzma
// will confusingly indicate the file being corrupt istead of // will confusingly indicate the file being corrupt instead of
// unsupported. I suppose it's still better this way, because // unsupported. I suppose it's still better this way, because
// in the foreseeable future (writing this in 2008) the only // in the foreseeable future (writing this in 2008) the only
// reason why files would appear having over 63-bit integers // reason why files would appear having over 63-bit integers

View File

@ -15,8 +15,9 @@
static void static void
delta_coder_end(lzma_coder *coder, const lzma_allocator *allocator) delta_coder_end(void *coder_ptr, const lzma_allocator *allocator)
{ {
lzma_delta_coder *coder = coder_ptr;
lzma_next_end(&coder->next, allocator); lzma_next_end(&coder->next, allocator);
lzma_free(coder, allocator); lzma_free(coder, allocator);
return; return;
@ -28,14 +29,17 @@ lzma_delta_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
const lzma_filter_info *filters) const lzma_filter_info *filters)
{ {
// Allocate memory for the decoder if needed. // Allocate memory for the decoder if needed.
if (next->coder == NULL) { lzma_delta_coder *coder = next->coder;
next->coder = lzma_alloc(sizeof(lzma_coder), allocator); if (coder == NULL) {
if (next->coder == NULL) coder = lzma_alloc(sizeof(lzma_delta_coder), allocator);
if (coder == NULL)
return LZMA_MEM_ERROR; return LZMA_MEM_ERROR;
next->coder = coder;
// End function is the same for encoder and decoder. // End function is the same for encoder and decoder.
next->end = &delta_coder_end; next->end = &delta_coder_end;
next->coder->next = LZMA_NEXT_CODER_INIT; coder->next = LZMA_NEXT_CODER_INIT;
} }
// Validate the options. // Validate the options.
@ -44,15 +48,14 @@ lzma_delta_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
// Set the delta distance. // Set the delta distance.
const lzma_options_delta *opt = filters[0].options; const lzma_options_delta *opt = filters[0].options;
next->coder->distance = opt->dist; coder->distance = opt->dist;
// Initialize the rest of the variables. // Initialize the rest of the variables.
next->coder->pos = 0; coder->pos = 0;
memzero(next->coder->history, LZMA_DELTA_DIST_MAX); memzero(coder->history, LZMA_DELTA_DIST_MAX);
// Initialize the next decoder in the chain, if any. // Initialize the next decoder in the chain, if any.
return lzma_next_filter_init(&next->coder->next, return lzma_next_filter_init(&coder->next, allocator, filters + 1);
allocator, filters + 1);
} }
@ -66,5 +69,5 @@ lzma_delta_coder_memusage(const void *options)
|| opt->dist > LZMA_DELTA_DIST_MAX) || opt->dist > LZMA_DELTA_DIST_MAX)
return UINT64_MAX; return UINT64_MAX;
return sizeof(lzma_coder); return sizeof(lzma_delta_coder);
} }

View File

@ -15,7 +15,7 @@
static void static void
decode_buffer(lzma_coder *coder, uint8_t *buffer, size_t size) decode_buffer(lzma_delta_coder *coder, uint8_t *buffer, size_t size)
{ {
const size_t distance = coder->distance; const size_t distance = coder->distance;
@ -27,11 +27,13 @@ decode_buffer(lzma_coder *coder, uint8_t *buffer, size_t size)
static lzma_ret static lzma_ret
delta_decode(lzma_coder *coder, const lzma_allocator *allocator, delta_decode(void *coder_ptr, const lzma_allocator *allocator,
const uint8_t *restrict in, size_t *restrict in_pos, const uint8_t *restrict in, size_t *restrict in_pos,
size_t in_size, uint8_t *restrict out, size_t in_size, uint8_t *restrict out,
size_t *restrict out_pos, size_t out_size, lzma_action action) size_t *restrict out_pos, size_t out_size, lzma_action action)
{ {
lzma_delta_coder *coder = coder_ptr;
assert(coder->next.code != NULL); assert(coder->next.code != NULL);
const size_t out_start = *out_pos; const size_t out_start = *out_pos;
@ -68,7 +70,7 @@ lzma_delta_props_decode(void **options, const lzma_allocator *allocator,
return LZMA_MEM_ERROR; return LZMA_MEM_ERROR;
opt->type = LZMA_DELTA_TYPE_BYTE; opt->type = LZMA_DELTA_TYPE_BYTE;
opt->dist = props[0] + 1; opt->dist = props[0] + 1U;
*options = opt; *options = opt;

Some files were not shown because too many files have changed in this diff Show More