]> icculus.org git repositories - icculus/xz.git/log
icculus/xz.git
13 years agoSilence a bogus Valgrind warning.
Lasse Collin [Wed, 2 Jun 2010 20:09:22 +0000 (23:09 +0300)]
Silence a bogus Valgrind warning.

When using -O2 with GCC, it liked to swap two comparisons
in one "if" statement. It's otherwise fine except that
the latter part, which is seemingly never executed, got
executed (nothing wrong with that) and then triggered
warning in Valgrind about conditional jump depending on
uninitialized variable. A few people find this annoying
so do things a bit differently to avoid the warning.

13 years agoFix a Windows-specific FIXME in signal handling code.
Lasse Collin [Wed, 2 Jun 2010 18:32:12 +0000 (21:32 +0300)]
Fix a Windows-specific FIXME in signal handling code.

13 years agoAdjust SA_RESTART workaround.
Lasse Collin [Wed, 2 Jun 2010 14:46:58 +0000 (17:46 +0300)]
Adjust SA_RESTART workaround.

I want to get a bug report if something else than
DJGPP lacks SA_RESTART.

13 years agoxz man page updates.
Lasse Collin [Tue, 1 Jun 2010 13:02:30 +0000 (16:02 +0300)]
xz man page updates.

- Concatenating .xz files and padding
- List mode
- Robot mode
- A few examples (but many more are needed)

13 years agoMajor update to xz --list.
Lasse Collin [Tue, 1 Jun 2010 12:51:44 +0000 (15:51 +0300)]
Major update to xz --list.

13 years agoRename message_filters_get() to message_filters_to_str().
Lasse Collin [Tue, 1 Jun 2010 11:13:03 +0000 (14:13 +0300)]
Rename message_filters_get() to message_filters_to_str().

13 years agoFix a comment.
Lasse Collin [Tue, 1 Jun 2010 11:09:12 +0000 (14:09 +0300)]
Fix a comment.

13 years agoFix lzma_block_compressed_size().
Lasse Collin [Thu, 27 May 2010 13:17:42 +0000 (16:17 +0300)]
Fix lzma_block_compressed_size().

13 years agoTake Cygwin into account in some #if lines.
Lasse Collin [Thu, 27 May 2010 11:32:51 +0000 (14:32 +0300)]
Take Cygwin into account in some #if lines.

This change is no-op, but good to have just in case
for the future.

13 years agoRemove references to the Subblock filter in xz and tests.
Lasse Collin [Thu, 27 May 2010 10:42:44 +0000 (13:42 +0300)]
Remove references to the Subblock filter in xz and tests.

Thanks to Jonathan Nieder.

13 years agoRemove unused chunk_size.c.
Lasse Collin [Thu, 27 May 2010 10:35:36 +0000 (13:35 +0300)]
Remove unused chunk_size.c.

Thanks to Jonathan Nieder for the reminder.

13 years agoUse my_min() instead of MIN() in src/xz/list.c
Jonathan Nieder [Thu, 27 May 2010 07:31:33 +0000 (02:31 -0500)]
Use my_min() instead of MIN() in src/xz/list.c

This should have been done in
920a69a8d8e4203c5edddd829d932130eac188ea.

13 years agoRename MIN() and MAX() to my_min() and my_max().
Lasse Collin [Wed, 26 May 2010 07:36:46 +0000 (10:36 +0300)]
Rename MIN() and MAX() to my_min() and my_max().

This should avoid some minor portability issues.

13 years agoFix compilation of debug/known_sizes.c.
Lasse Collin [Wed, 26 May 2010 07:30:20 +0000 (10:30 +0300)]
Fix compilation of debug/known_sizes.c.

13 years agoRemove references to Subblock filter in debug/sync_flush.c.
Lasse Collin [Wed, 26 May 2010 07:28:54 +0000 (10:28 +0300)]
Remove references to Subblock filter in debug/sync_flush.c.

13 years agoBetter #error message.
Lasse Collin [Wed, 26 May 2010 07:16:57 +0000 (10:16 +0300)]
Better #error message.

13 years agoRemove the Subblock filter code for now.
Lasse Collin [Wed, 26 May 2010 06:55:47 +0000 (09:55 +0300)]
Remove the Subblock filter code for now.

The spec isn't finished and the code didn't compile anymore.
It won't be included in XZ Utils 5.0.0. It's easy to get it
back once the spec is done.

13 years agoSplit message_filters().
Lasse Collin [Sun, 16 May 2010 15:42:22 +0000 (18:42 +0300)]
Split message_filters().

message_filters_to_str() converts the filter chain to
a string. message_filters_show() replaces the original
message_filters().

uint32_to_optstr() was also added to show the dictionary
size in nicer format when possible.

13 years agoOmit lzma_restrict from the API headers.
Lasse Collin [Fri, 14 May 2010 20:17:20 +0000 (23:17 +0300)]
Omit lzma_restrict from the API headers.

It isn't really useful so omitting it makes things
shorter and slightly more readable.

13 years agoUpdated INSTALL.
Lasse Collin [Mon, 10 May 2010 16:57:24 +0000 (19:57 +0300)]
Updated INSTALL.

13 years agoUpdated THANKS.
Lasse Collin [Mon, 10 May 2010 16:54:52 +0000 (19:54 +0300)]
Updated THANKS.

13 years agoUpdates to tuklib_physmem and tuklib_cpucores.
Lasse Collin [Mon, 10 May 2010 16:54:15 +0000 (19:54 +0300)]
Updates to tuklib_physmem and tuklib_cpucores.

Don't use #error to generate compile error, because some
compilers actually don't take it as an error. This fixes
tuklib_physmem on IRIX.

Fix incorrect error check for sysconf() return values.

Add AIX, HP-UX, and Tru64 specific code to detect the
amount RAM.

Add HP-UX specific code to detect the number of CPU cores.

Thanks a lot to Peter O'Gorman for initial patches,
testing, and debugging these fixes.

14 years agoShow both elapsed time and estimated remaining time in xz -v.
Lasse Collin [Mon, 12 Apr 2010 18:55:56 +0000 (21:55 +0300)]
Show both elapsed time and estimated remaining time in xz -v.

The extra space for showing both has been taken from the
sizes field. If the sizes grow big, bigger units than MiB
will be used. It makes it slightly difficult to see that
progress is still happening with huge files, but it should
be OK in practice.

Thanks to Trent W. Buck for <http://bugs.debian.org/574583>
and Jonathan Nieder for suggestions how to fix it.

14 years agoAdd a simple tip to faq.txt about tar and xz.
Lasse Collin [Wed, 31 Mar 2010 13:47:25 +0000 (16:47 +0300)]
Add a simple tip to faq.txt about tar and xz.

Thanks to Gilles Espinasse.

14 years agoUpdated THANKS.
Lasse Collin [Mon, 22 Mar 2010 19:03:03 +0000 (21:03 +0200)]
Updated THANKS.

14 years agoFix xzgrep to not break if filenames have spaces or quotes.
Lasse Collin [Sun, 7 Mar 2010 17:52:25 +0000 (19:52 +0200)]
Fix xzgrep to not break if filenames have spaces or quotes.

Thanks to someone who reported the bug on IRC.

14 years agoTreat all integer multiplier suffixes as base-2.
Lasse Collin [Sun, 7 Mar 2010 11:59:32 +0000 (13:59 +0200)]
Treat all integer multiplier suffixes as base-2.

Originally both base-2 and base-10 were supported, but since
there seems to be little need for base-10 in XZ Utils, treat
everything as base-2 and also be more relaxed about the case
of the first letter of the suffix. Now xz will accept e.g.
KiB, Ki, k, K, kB, and KB, and interpret them all as 1024. The
recommended spelling of the suffixes are still KiB, MiB, and GiB.

14 years agoConsistently round up the memory usage limit in messages.
Lasse Collin [Sun, 7 Mar 2010 11:50:23 +0000 (13:50 +0200)]
Consistently round up the memory usage limit in messages.

It still feels a bit wrong to round 1 byte to 1 MiB but
at least it is now done consistently so that the same
byte value is always rounded the same way to MiB.

14 years agoChange the default of --enable-assume-ram from 32 to 128 MiB.
Lasse Collin [Sun, 7 Mar 2010 11:34:34 +0000 (13:34 +0200)]
Change the default of --enable-assume-ram from 32 to 128 MiB.

This is to allow files created with "xz -9" to be decompressed
if the amount of RAM cannot be determined.

14 years agoIncrease the default memory usage limit on "low-memory" systems.
Lasse Collin [Sun, 7 Mar 2010 11:29:28 +0000 (13:29 +0200)]
Increase the default memory usage limit on "low-memory" systems.

Previously the default limit was always 40 % of RAM. The
new limit is a little bit more complex:

  - If 40 % of RAM is at least 80 MiB, 40 % of RAM is used
    as the limit.

  - If 80 % of RAM is over 80 MiB, 80 MiB is used as the limit.

  - Otherwise 80 % of RAM is used as the limit.

This should make it possible to decompress files created with
"xz -9" on more systems. Swapping is generally more expected
on systems with less RAM, so higher default limit on them
shouldn't cause too bad surprises in terms of heavy swapping.
Instead, the higher default limit should reduce the number of
bad surprises when it used to prevent decompression of files
created with "xz -9". The DoS prevention system shouldn't be
a DoS itself.

Note that even with the new default limit, a system with 64 MiB
RAM cannot decompress files created with "xz -9" without user
overriding the limit. This should be OK, because if xz is going
to need more memory than the system has RAM, it will run very
very slowly and thus it's good that user has to override the limit
in that case.

14 years agoUpdated THANKS.
Lasse Collin [Sat, 6 Mar 2010 19:36:19 +0000 (21:36 +0200)]
Updated THANKS.

14 years agoFix missing initialization in lzma_strm_init().
Lasse Collin [Sat, 6 Mar 2010 19:17:20 +0000 (21:17 +0200)]
Fix missing initialization in lzma_strm_init().

With bad luck, lzma_code() could return LZMA_BUF_ERROR
when it shouldn't.

This has been here since the early days of liblzma.
It got triggered by the modifications made to the xz
tool in commit 18c10c30d2833f394cd7bce0e6a821044b15832f
but only when decompressing .lzma files. Somehow I managed
to miss testing that with Valgrind earlier.

This fixes <http://bugs.gentoo.org/show_bug.cgi?id=305591>.
Thanks to Rafał Mużyło for helping to debug it on IRC.

14 years agoCollection of language fixes to comments and docs.
Lasse Collin [Fri, 12 Feb 2010 11:16:15 +0000 (13:16 +0200)]
Collection of language fixes to comments and docs.

Thanks to Jonathan Nieder.

14 years agoFix jl -> jb in ASM files.
Lasse Collin [Fri, 12 Feb 2010 10:41:20 +0000 (12:41 +0200)]
Fix jl -> jb in ASM files.

14 years agoUse __APPLE__ instead of __MACH__ in ASM files.
Lasse Collin [Fri, 12 Feb 2010 10:31:22 +0000 (12:31 +0200)]
Use __APPLE__ instead of __MACH__ in ASM files.

This allows the files to work on HURD.

Thanks to Jonathan Nieder.

14 years agoSubtle change to liblzma Block handling API.
Lasse Collin [Sun, 7 Feb 2010 17:48:06 +0000 (19:48 +0200)]
Subtle change to liblzma Block handling API.

lzma_block.version has to be initialized even for
lzma_block_header_decode(). This way a future version
of liblzma won't allocate memory in a way that an old
application doesn't know how to free it.

The subtlety of this change is that all current apps
using lzma_block_header_decode() will keep working for
now, because the only possible version value is zero,
and lzma_block_header_decode() unconditionally sets the
version to zero even now. Unless fixed, these apps will
break in the future if a new version of the Block options
is ever needed.

14 years agoFix wrong assertion.
Lasse Collin [Tue, 2 Feb 2010 09:50:11 +0000 (11:50 +0200)]
Fix wrong assertion.

This was added in 455e68c030fde8a8c2f5e254c3b3ab9489bf3735.

14 years agoUpdated TODO.
Lasse Collin [Mon, 1 Feb 2010 20:48:42 +0000 (22:48 +0200)]
Updated TODO.

14 years agoFix typos in comments.
Lasse Collin [Mon, 1 Feb 2010 20:47:54 +0000 (22:47 +0200)]
Fix typos in comments.

14 years agoFix signal handling for --list.
Lasse Collin [Mon, 1 Feb 2010 20:46:56 +0000 (22:46 +0200)]
Fix signal handling for --list.

14 years agoFix compression of symlinks with --force.
Lasse Collin [Mon, 1 Feb 2010 09:44:45 +0000 (11:44 +0200)]
Fix compression of symlinks with --force.

xz --force accepted symlinks, but didn't remove
them after successful compression. Instead, an error
message was displayed.

14 years agoFix a comment.
Lasse Collin [Mon, 1 Feb 2010 08:20:57 +0000 (10:20 +0200)]
Fix a comment.

14 years agoUpdated THANKS.
Lasse Collin [Sun, 31 Jan 2010 21:43:54 +0000 (23:43 +0200)]
Updated THANKS.

14 years agoUpdated TODO.
Lasse Collin [Sun, 31 Jan 2010 21:41:29 +0000 (23:41 +0200)]
Updated TODO.

14 years agoMention TODO in README.
Lasse Collin [Sun, 31 Jan 2010 21:35:04 +0000 (23:35 +0200)]
Mention TODO in README.

14 years agoUpdated INSTALL.
Lasse Collin [Sun, 31 Jan 2010 21:31:14 +0000 (23:31 +0200)]
Updated INSTALL.

14 years agoRevise the Windows build files.
Lasse Collin [Sun, 31 Jan 2010 21:28:51 +0000 (23:28 +0200)]
Revise the Windows build files.

The old Makefile + config.h was deleted, because it
becomes outdated too easily and building with the
Autotools based build system works fine even on Windows.

windows/build.sh hasn't got much testing, but it should
work to build 32-bit x86 and x86-64 versions of XZ Utils
using MSYS, MinGW or MinGW-w32, and MinGW-w64.

windows/INSTALL-Windows.txt describes what packages are
needed and how to install them.

windows/README-Windows.txt is a readme file for the binary
package that build.sh hopefully builds.

There are no instructions about using Autotools for now,
so those using a git snapshot may want to run
"autoreconf -fi && ./configure && make mydist" on a UN*X
box and then copy the resulting .tar.gz to a Windows.

14 years agoSelect the default integrity check type at runtime.
Lasse Collin [Sun, 31 Jan 2010 17:52:38 +0000 (19:52 +0200)]
Select the default integrity check type at runtime.

Previously it was set statically to CRC64 or CRC32
depending on options passed to the configure script.

14 years agoImprove displaying of the memory usage limit.
Lasse Collin [Sun, 31 Jan 2010 16:17:50 +0000 (18:17 +0200)]
Improve displaying of the memory usage limit.

14 years agoDon't use uninitialized sigset_t.
Lasse Collin [Sun, 31 Jan 2010 10:53:56 +0000 (12:53 +0200)]
Don't use uninitialized sigset_t.

If signal handlers haven't been established, then it's
useless to try to block them, especially since the sigset_t
used for blocking hasn't been initialized yet.

14 years agoDelay opening the destionation file and other fixes.
Lasse Collin [Sun, 31 Jan 2010 10:01:54 +0000 (12:01 +0200)]
Delay opening the destionation file and other fixes.

The opening of the destination file is now delayed a little.
The coder is initialized, and if decompressing, the memory
usage of the first Block compared against the memory
usage limit before the destination file is opened. This
means that if --force was used, the old "target" file won't
be deleted so easily when something goes wrong very early.
Thanks to Mark K for the bug report.

The above fix required some changes to progress message
handling. Now there is a separate function for setting and
printing the filename. It is used also in list.c.

list_file() now handles stdin correctly (gives an error).

A useless check for user_abort was removed from file_io.c.

14 years agoAdd list.h to src/xz/Makefile.am.
Lasse Collin [Fri, 29 Jan 2010 20:48:04 +0000 (22:48 +0200)]
Add list.h to src/xz/Makefile.am.

This should have been already in
0bc9eab243dee3be764b3530433a7fcdc3f7c6a1.

14 years agoAdd lzmainfo.1 to manfiles list to convert to .txt and .pdf.
Lasse Collin [Fri, 29 Jan 2010 11:24:27 +0000 (13:24 +0200)]
Add lzmainfo.1 to manfiles list to convert to .txt and .pdf.

14 years agoSilence two compiler warnings on DOS-like systems.
Lasse Collin [Wed, 27 Jan 2010 14:42:11 +0000 (16:42 +0200)]
Silence two compiler warnings on DOS-like systems.

14 years agoUse PACKAGE_URL instead of custom PACKAGE_HOMEPAGE.
Lasse Collin [Wed, 27 Jan 2010 11:31:03 +0000 (13:31 +0200)]
Use PACKAGE_URL instead of custom PACKAGE_HOMEPAGE.

14 years agoAdd a missing space to an error message.
Lasse Collin [Tue, 26 Jan 2010 21:37:46 +0000 (23:37 +0200)]
Add a missing space to an error message.

Thanks to Robert Readman.

14 years agoUse past tense in error message in io_unlink().
Lasse Collin [Tue, 26 Jan 2010 20:53:37 +0000 (22:53 +0200)]
Use past tense in error message in io_unlink().

Added a note to translators too.

Thanks to Robert Readman.

14 years agoFix too small static buffer in util.c.
Lasse Collin [Tue, 26 Jan 2010 13:42:24 +0000 (15:42 +0200)]
Fix too small static buffer in util.c.

This was introduced in
0dd6d007669b946543ca939a44243833c79e08f4 two days ago.

14 years agoMinor comment fix.
Lasse Collin [Tue, 26 Jan 2010 12:46:43 +0000 (14:46 +0200)]
Minor comment fix.

14 years agoAdd initial version of xz --list.
Lasse Collin [Sun, 24 Jan 2010 21:50:54 +0000 (23:50 +0200)]
Add initial version of xz --list.

This is a bit rough but should be useful for basic things.
Ideas (with detailed examples) about the output format are
welcome.

The output of --robot --list is not necessarily stable yet,
although I don't currently have any plans about changing it.

The man page hasn't been updated yet.

14 years agoAdd io_pread().
Lasse Collin [Sun, 24 Jan 2010 20:46:11 +0000 (22:46 +0200)]
Add io_pread().

It will be used by --list.

14 years agoSet LC_NUMERIC=C when --robot is used.
Lasse Collin [Sun, 24 Jan 2010 20:45:14 +0000 (22:45 +0200)]
Set LC_NUMERIC=C when --robot is used.

It is to ensure that floating point numbers
will always have a dot as the decimal separator.

14 years agoSome improvements to printing sizes in xz.
Lasse Collin [Sun, 24 Jan 2010 14:57:40 +0000 (16:57 +0200)]
Some improvements to printing sizes in xz.

14 years agoFix a typo in README.
Lasse Collin [Wed, 20 Jan 2010 20:02:35 +0000 (22:02 +0200)]
Fix a typo in README.

Thanks to R. Bijker.

14 years agoUpdated windows/Makefile.
Lasse Collin [Sun, 17 Jan 2010 09:59:54 +0000 (11:59 +0200)]
Updated windows/Makefile.

Thanks to Dan Shechter for the patch.

It is likely that windows/Makefile will be removed
completely, because Autotols based build nowadays
works well with both 32-bit and 64-bit MinGW (I
just need to update the docs).

14 years agoUpdate the xz man page to match the previous two commits.
Lasse Collin [Fri, 15 Jan 2010 09:05:11 +0000 (11:05 +0200)]
Update the xz man page to match the previous two commits.

14 years agoDon't read compressed data from a terminal or write it
Lasse Collin [Wed, 13 Jan 2010 17:10:25 +0000 (19:10 +0200)]
Don't read compressed data from a terminal or write it
to a terminal even if --force is specified.

It just seems more reasonable this way.

The new behavior matches bzip2. The old one matched gzip.

14 years agoDon't compress or decompress special files unless writing
Lasse Collin [Wed, 13 Jan 2010 16:12:40 +0000 (18:12 +0200)]
Don't compress or decompress special files unless writing
to stdout even if --force is used.

--force will still enable compression of symlinks, but only
in case they point to a regular file.

The new way simply seems more reasonable. It matches gzip's
behavior while the old one matched bzip2's behavior.

14 years agoUpdated THANKS.
Lasse Collin [Tue, 12 Jan 2010 14:30:33 +0000 (16:30 +0200)]
Updated THANKS.

14 years agoAdd IRIX-specific code to tuklib_physmem and tuklib_cpucores.
Lasse Collin [Tue, 12 Jan 2010 14:18:14 +0000 (16:18 +0200)]
Add IRIX-specific code to tuklib_physmem and tuklib_cpucores.

This is untested but it will get tested soon and, if needed,
fixed before 5.0.0.

Thanks to Stuart Shelton.

14 years agoFix _memconfig() functions.
Lasse Collin [Thu, 31 Dec 2009 22:29:10 +0000 (00:29 +0200)]
Fix _memconfig() functions.

This affects lzma_memusage() and lzma_memlimit_get().

14 years agoRevised the Index handling code.
Lasse Collin [Thu, 31 Dec 2009 20:45:53 +0000 (22:45 +0200)]
Revised the Index handling code.

This breaks API and ABI but most apps are not affected
since most apps don't use this part of the API. You will
get a compile error if you are using anything that got
broken.

Summary of changes:

  - Ability to store Stream Flags, which are needed
    for random-access reading in multi-Stream files.

  - Separate function to set size of Stream Padding.

  - Iterator structure makes it possible to read the same
    lzma_index from multiple threads at the same time.

  - A lot faster code to locate Blocks.

  - Removed lzma_index_equal() without adding anything
    to replace it. I don't know what it should do exactly
    with the new features and what actually needs this
    function in the first place other than test_index.c,
    which now has its own code to compare lzma_indexes.

14 years agoRemove c-format tag in cs.po.
Lasse Collin [Thu, 31 Dec 2009 19:13:25 +0000 (21:13 +0200)]
Remove c-format tag in cs.po.

It was fixed in the C code earlier.

14 years agoAdd missing lzma_nothrow in filter.h.
Lasse Collin [Thu, 31 Dec 2009 19:11:05 +0000 (21:11 +0200)]
Add missing lzma_nothrow in filter.h.

14 years agoRemove redefinition of _(msgid) macro from lzmainfo.c.
Lasse Collin [Wed, 9 Dec 2009 16:13:44 +0000 (18:13 +0200)]
Remove redefinition of _(msgid) macro from lzmainfo.c.

14 years agoupdate po/.gitignore
Jonathan Nieder [Wed, 9 Dec 2009 01:41:57 +0000 (19:41 -0600)]
update po/.gitignore

Since the *.gmo files are deleted by the maintainer-clean target,
I assume they are not meant to be tracked.

Also add the other files listed in the Makefile’s clean targets
(stamp-poT, xz.po, xz.[12].po, *.new.po, xz.mo) to make sure they
are not accidentally tracked.  Most of these are intermediate
files that would not appear unless a build is interrupted or
fails.

Split the list of untracked files by origin to make it easier to
tell if files are missing in the future.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
14 years agoAlways rely on GCC's auto-import on Windows.
Lasse Collin [Tue, 8 Dec 2009 22:38:55 +0000 (00:38 +0200)]
Always rely on GCC's auto-import on Windows.

I understood that this is nicer, because then people
don't need to worry about the LZMA_API_STATIC macro.

Thanks to Charles Wilson and Keith Marshall.

14 years agoFix file_io.c on DOS-like systems.
Lasse Collin [Mon, 7 Dec 2009 19:46:53 +0000 (21:46 +0200)]
Fix file_io.c on DOS-like systems.

The problem was introduced when adding sparse file
support in 465d1b0d6518c5d980f2db4c2d769f9905bdd902.

Thanks to Charles Wilson.

14 years agoAdd Czech translation.
Lasse Collin [Mon, 7 Dec 2009 18:54:21 +0000 (20:54 +0200)]
Add Czech translation.

Thanks to Marek Černocký.

Other people planning to translate xz: Note that the
messages are a little bit in flux still. Translations
are still welcome, just be prepared to some extra work
in case there are changes.

14 years agoAdd a note for translators to add a bug reporting address
Lasse Collin [Mon, 7 Dec 2009 18:32:08 +0000 (20:32 +0200)]
Add a note for translators to add a bug reporting address
for translation bugs.

14 years agoPrevent xgettext from taking one regular string as a C format string.
Lasse Collin [Mon, 7 Dec 2009 18:07:02 +0000 (20:07 +0200)]
Prevent xgettext from taking one regular string as a C format string.

Thanks to Marek Černocký.

14 years agoRemove duplicate code in io_open_dest().
Lasse Collin [Sat, 28 Nov 2009 15:45:22 +0000 (17:45 +0200)]
Remove duplicate code in io_open_dest().

Fix a missing _() in the error message too.

14 years agoTypo fix to sysdefs.h.
Lasse Collin [Thu, 26 Nov 2009 08:11:23 +0000 (10:11 +0200)]
Typo fix to sysdefs.h.

Thanks to Jonathan Nieder.

14 years agoFix a memory leak in test_index.c.
Lasse Collin [Thu, 26 Nov 2009 08:10:36 +0000 (10:10 +0200)]
Fix a memory leak in test_index.c.

This was introduced in
bd13b04e202b6f495a68eb0766f97085b7c50a06.

Thanks to Jim Meyering for noticing it.

14 years agoAdd missing error check to coder.c.
Lasse Collin [Wed, 25 Nov 2009 12:22:19 +0000 (14:22 +0200)]
Add missing error check to coder.c.

With bad luck this could cause a segfault due to
reading (but not writing) past the end of the buffer.

14 years agoFix bugs in lzma_index_read() and lzma_index_cat().
Lasse Collin [Wed, 25 Nov 2009 11:04:10 +0000 (13:04 +0200)]
Fix bugs in lzma_index_read() and lzma_index_cat().

lzma_index_read() didn't skip over Stream Padding
if it was the first record in the Index.

lzma_index_cat() didn't combine small Indexes correctly.

The test suite was updated to check for these bugs.

These bugs didn't affect the xz command line tool or
most users of liblzma in any way.

14 years agoIndex decoder fixes.
Lasse Collin [Wed, 25 Nov 2009 10:52:56 +0000 (12:52 +0200)]
Index decoder fixes.

The Index decoder code didn't perfectly match the API docs,
which said that *i will be set to point to the decoded Index
only after decoding has succeeded. The docs were a bit unclear
too.

Now the decoder will initially set *i to NULL. *i will be set
to point to the decoded Index once decoding has succeeded.
This simplifies applications too, since it avoids dangling
pointers.

14 years agoCreate sparse files by default when decompressing into
Lasse Collin [Wed, 25 Nov 2009 09:19:20 +0000 (11:19 +0200)]
Create sparse files by default when decompressing into
a regular file.

Sparse file creation can be disabled with --no-sparse.
I don't promise yet that the name of this option won't
change before 5.0.0. It's possible that the code, that
checks when it is safe to use sparse output on stdout,
is not good enough, and a more flexible command line
option is needed to configure sparse file handling.

14 years agoUpdated THANKS.
Lasse Collin [Sun, 22 Nov 2009 10:43:06 +0000 (12:43 +0200)]
Updated THANKS.

14 years agoAdd missing consts to pointer casts.
Lasse Collin [Sun, 22 Nov 2009 10:05:33 +0000 (12:05 +0200)]
Add missing consts to pointer casts.

14 years agoEnable assembler code only if it is known to work
Lasse Collin [Sun, 22 Nov 2009 10:00:30 +0000 (12:00 +0200)]
Enable assembler code only if it is known to work
on that operating system.

I'm too lazy to think how to make a good Autoconf test
for this and it's not that important anyway.

No longer define HAVE_ASM_X86 or HAVE_ASM_X86_64.
Inline assembler (if any) is used if a macro like
__i386__ or __x86_64__ is defined.

14 years agoMake fastpos.h use tuklib_integer.h instead of bsr.h
Lasse Collin [Sun, 22 Nov 2009 09:55:03 +0000 (11:55 +0200)]
Make fastpos.h use tuklib_integer.h instead of bsr.h
when --enable-small has been specified.

14 years agoUpdate tuklib_integer.h with bit scan functions.
Lasse Collin [Sun, 22 Nov 2009 09:52:30 +0000 (11:52 +0200)]
Update tuklib_integer.h with bit scan functions.

Thanks to Joachim Henke for the original patch.

14 years agoUpdate tuklib_cpucores.m4 and tuklib_physmem.m4 from tuklib,
Lasse Collin [Fri, 20 Nov 2009 10:51:19 +0000 (12:51 +0200)]
Update tuklib_cpucores.m4 and tuklib_physmem.m4 from tuklib,
which now use AC_CACHE_CHECK. Using the cache variable,
configure now warns if there is no method to detect the amount
of RAM and recommends using --enable-assume-ram.

14 years agoAdd support for --info-memory and --robot to xz.
Lasse Collin [Mon, 16 Nov 2009 16:16:45 +0000 (18:16 +0200)]
Add support for --info-memory and --robot to xz.

Currently --robot works only with --info-memory and
--version. --help and --long-help work too, but --robot
has no effect on them.

Thanks to Jonathan Nieder for the original patches.

14 years agoFix wrong indentation caused by incorrect settings
Lasse Collin [Sun, 15 Nov 2009 10:54:45 +0000 (12:54 +0200)]
Fix wrong indentation caused by incorrect settings
in the text editor.

14 years agoAdd lzma_physmem().
Lasse Collin [Sun, 15 Nov 2009 10:40:17 +0000 (12:40 +0200)]
Add lzma_physmem().

I had hoped to keep liblzma as purely a compression
library as possible (e.g. file I/O will go into
a different library), but it seems that applications
linking agaisnt liblzma need some way to determine
the memory usage limit, and knowing the amount of RAM
is one reasonable way to help making such decisions.

Thanks to Jonathan Nieder for the original patch.

14 years agoUpdated THANKS.
Lasse Collin [Sat, 14 Nov 2009 18:21:19 +0000 (20:21 +0200)]
Updated THANKS.

14 years agoSome updates to xz man page.
Lasse Collin [Sat, 14 Nov 2009 18:20:03 +0000 (20:20 +0200)]
Some updates to xz man page.

14 years agoFix description of --memory in --long-help.
Lasse Collin [Sat, 14 Nov 2009 17:51:03 +0000 (19:51 +0200)]
Fix description of --memory in --long-help.