Commit Graph

532 Commits

Author SHA1 Message Date
Lasse Collin f7e44c6c11 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.
2009-12-09 00:38:55 +02:00
Lasse Collin 7b76a3e233 Fix file_io.c on DOS-like systems.
The problem was introduced when adding sparse file
support in 465d1b0d65.

Thanks to Charles Wilson.
2009-12-07 21:46:53 +02:00
Lasse Collin 0696f5d268 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.
2009-12-07 20:54:21 +02:00
Lasse Collin 5e817a50d2 Add a note for translators to add a bug reporting address
for translation bugs.
2009-12-07 20:32:08 +02:00
Lasse Collin 6db1c35be9 Prevent xgettext from taking one regular string as a C format string.
Thanks to Marek Černocký.
2009-12-07 20:07:02 +02:00
Lasse Collin e0c2776b6f Remove duplicate code in io_open_dest().
Fix a missing _() in the error message too.
2009-11-28 17:45:22 +02:00
Lasse Collin f057a33c6f Typo fix to sysdefs.h.
Thanks to Jonathan Nieder.
2009-11-26 10:11:23 +02:00
Lasse Collin 8767b41534 Fix a memory leak in test_index.c.
This was introduced in
bd13b04e20.

Thanks to Jim Meyering for noticing it.
2009-11-26 10:10:36 +02:00
Lasse Collin 919fbaff86 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.
2009-11-25 14:22:19 +02:00
Lasse Collin bd13b04e20 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.
2009-11-25 13:04:10 +02:00
Lasse Collin 1f19690914 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.
2009-11-25 12:52:56 +02:00
Lasse Collin 465d1b0d65 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.
2009-11-25 11:19:20 +02:00
Lasse Collin 37de544414 Updated THANKS. 2009-11-22 12:43:06 +02:00
Lasse Collin f1a28b96c9 Add missing consts to pointer casts. 2009-11-22 12:05:33 +02:00
Lasse Collin b9b5c54cd4 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.
2009-11-22 12:00:30 +02:00
Lasse Collin 0733f4c999 Make fastpos.h use tuklib_integer.h instead of bsr.h
when --enable-small has been specified.
2009-11-22 11:55:03 +02:00
Lasse Collin 7ac3985d89 Update tuklib_integer.h with bit scan functions.
Thanks to Joachim Henke for the original patch.
2009-11-22 11:52:30 +02:00
Lasse Collin c74c132f7f 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.
2009-11-20 12:51:19 +02:00
Lasse Collin d315ca4930 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.
2009-11-16 18:16:45 +02:00
Lasse Collin e330fb7e6b Fix wrong indentation caused by incorrect settings
in the text editor.
2009-11-15 12:54:45 +02:00
Lasse Collin 93e418562c 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.
2009-11-15 12:40:17 +02:00
Lasse Collin cf39faca59 Updated THANKS. 2009-11-14 20:21:19 +02:00
Lasse Collin 2ddcae247c Some updates to xz man page. 2009-11-14 20:20:03 +02:00
Lasse Collin 19b2674f07 Fix description of --memory in --long-help. 2009-11-14 19:51:03 +02:00
Lasse Collin 2291346f0c Update the debug programs so that they compile again. 2009-11-14 19:45:39 +02:00
Lasse Collin 418d64a32e Fix a design error in liblzma API.
Originally the idea was that using LZMA_FULL_FLUSH
with Stream encoder would read the filter chain
from the same array that was used to intialize the
Stream encoder. Since most apps wouldn't use
LZMA_FULL_FLUSH, most apps wouldn't need to keep
the filter chain available after initializing the
Stream encoder. However, due to my mistake, it
actually required keeping the array always available.

Since setting the new filter chain via the array
used at initialization time is not a nice way to do
it for a couple of reasons, this commit ditches it
and introduces lzma_filters_update(). This new function
replaces also the "persistent" flag used by LZMA2
(and to-be-designed Subblock filter), which was also
an ugly thing to do.

Thanks to Alexey Tourbin for reminding me about the problem
that Stream encoder used to require keeping the filter
chain allocated.
2009-11-14 18:59:19 +02:00
Lasse Collin f0bf7634b7 Fix wrong function name in the previous commit.
It was meant to be lzma_filters_copy(), not lzma_filters_dup().
2009-10-17 11:11:58 +03:00
Lasse Collin 6d118a0b9d Add lzma_filters_copy().
This will be needed internally by liblzma once I fix
a design mistake in the encoder API. This function may
be useful to applications too so it's good to export it.
2009-10-17 01:47:07 +03:00
Jonathan Nieder 78e92c1847 Escape dashes in xzmore.1
A minus sign is larger, easier to see in a printout, and more
likely to use the same glyph as ASCII hyphen-minus in a terminal
than a hyphen.  Since broken manual pagers do not find hyphens
when the user searches for a hyphen-minus, minus signs are also
easier to search for.  So use minus signs instead of hyphens to
render sample terminal output.
2009-10-16 20:39:24 +03:00
Lasse Collin 7b7fe902d9 Mention --check=none in --long-help. It was already in
the man page though.

Thanks to Jim Meyering for noticing this.
2009-10-16 20:35:39 +03:00
Lasse Collin ebfb2c5e1f Use a tuklib module for integer handling.
This replaces bswap.h and integer.h.

The tuklib module uses <byteswap.h> on GNU,
<sys/endian.h> on *BSDs and <sys/byteorder.h>
on Solaris, which may contain optimized code
like inline assembly.
2009-10-04 22:57:12 +03:00
Lasse Collin 29fd321033 Add support for --enable-assume-ram=SIZE. 2009-10-02 14:35:56 +03:00
Lasse Collin 3782b3fee4 Use unaligned access (if possible) on both endiannesses
in lz_encoder_hash.h.
2009-10-02 11:28:17 +03:00
Lasse Collin c5f68b5cc7 Make liblzma produce the same output on both endiannesses.
Seems that it is a problem in some cases if the same
version of XZ Utils produces different output on different
endiannesses, so this commit fixes that problem. The output
will still vary between different XZ Utils versions, but I
cannot avoid that for now.

This commit bloatens the code on big endian systems by 1 KiB,
which should be OK since liblzma is bloated already. ;-)
2009-10-02 11:03:26 +03:00
Mike Frysinger 4a84d1adfd add lzmainfo to gitignore
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-27 11:53:48 +03:00
Lasse Collin 188a1dcd0c Updated THANKS. 2009-09-27 11:53:36 +03:00
Lasse Collin db9119b918 Work around a bug in Interix header files.
Thanks to Markus Duft for the patch.
2009-09-27 11:48:54 +03:00
Lasse Collin b3d105e697 Fix an error in OpenVMS-specific code.
Thanks to Jouk Jansen.
2009-09-24 17:50:17 +03:00
Lasse Collin 5e000ff00d Added OpenVMS-specific information to INSTALL. 2009-09-22 18:59:56 +03:00
Lasse Collin 932b2e2044 Better fixes for OpenVMS support.
Thanks to Jouk Jansen.
2009-09-22 14:03:02 +03:00
Lasse Collin 4c3630ec41 Avoid non-standard preprocessor construct.
Thanks to Jouk Jansen.
2009-09-22 13:40:19 +03:00
Lasse Collin 0deb1bb60a Make sure that TUKLIB_DOSLIKE doesn't get defined on Cygwin.
Thanks to Charles Wilson.
2009-09-21 19:50:09 +03:00
Lasse Collin e599bba421 Various changes.
Separate a few reusable components from XZ Utils specific
code. The reusable code is now in "tuklib" modules. A few
more could be separated still, e.g. bswap.h.

Fix some bugs in lzmainfo.

Fix physmem and cpucores code on OS/2. Thanks to Elbert Pol
for help.

Add OpenVMS support into physmem. Add a few #ifdefs to ease
building XZ Utils on OpenVMS. Thanks to Jouk Jansen for the
original patch.
2009-09-19 09:47:30 +03:00
Lasse Collin 49cfc8d392 Fix incorrect use of "restrict". 2009-09-15 21:07:23 +03:00
Lasse Collin 15ffd675ab Fix GCC version check for nothrow attribute. 2009-09-12 14:09:17 +03:00
Lasse Collin 6bfdd3a88a Updated THANKS. 2009-09-12 14:08:15 +03:00
Lasse Collin 4ab7b16b95 A few grammar fixes.
Thanks to Christian Weisgerber for pointing out some of these.
2009-09-12 14:07:36 +03:00
Lasse Collin 8905a33daa Updated THANKS. 2009-09-11 17:08:15 +03:00
Lasse Collin 68059334ff Add PACKAGE_HOMEPAGE to {windows,dos}/config.h to fix build errors. 2009-09-11 17:06:32 +03:00
Lasse Collin 221be761f4 Use $(LN_EXEEXT) in symlinks to executables.
This fixes "make install" on operating systems using
a suffix for executables.

Cygwin is treated specially. The symlink names won't have
.exe suffix even though the executables themselves have.
Thanks to Charles Wilson.
2009-09-11 10:24:09 +03:00