Commit Graph

1699 Commits

Author SHA1 Message Date
Lasse Collin 0bc9eab243 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.
2010-01-24 23:50:54 +02:00
Lasse Collin df254ce03b Add io_pread().
It will be used by --list.
2010-01-24 22:46:11 +02:00
Lasse Collin ef68dd4a92 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.
2010-01-24 22:45:14 +02:00
Lasse Collin 0dd6d00766 Some improvements to printing sizes in xz. 2010-01-24 16:57:40 +02:00
Lasse Collin 2a98fdffd6 Fix a typo in README.
Thanks to R. Bijker.
2010-01-20 22:02:35 +02:00
Lasse Collin 07a11dad44 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).
2010-01-17 11:59:54 +02:00
Lasse Collin 37f31ead9d Update the xz man page to match the previous two commits. 2010-01-15 11:05:11 +02:00
Lasse Collin 3ffd5d81a4 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.
2010-01-13 19:10:25 +02:00
Lasse Collin 23ac2c44c3 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.
2010-01-13 18:12:40 +02:00
Lasse Collin cee12aa852 Updated THANKS. 2010-01-12 16:30:33 +02:00
Lasse Collin 153c7740c5 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.
2010-01-12 16:18:14 +02:00
Lasse Collin 8ea8dc754a Fix _memconfig() functions.
This affects lzma_memusage() and lzma_memlimit_get().
2010-01-01 00:29:10 +02:00
Lasse Collin 1a7ec87c8e 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.
2009-12-31 22:45:53 +02:00
Lasse Collin f29997a846 Remove c-format tag in cs.po.
It was fixed in the C code earlier.
2009-12-31 21:13:25 +02:00
Lasse Collin 097bad0003 Add missing lzma_nothrow in filter.h. 2009-12-31 21:11:05 +02:00
Lasse Collin b56cb1fc31 Remove redefinition of _(msgid) macro from lzmainfo.c. 2009-12-09 18:13:44 +02:00
Jonathan Nieder 171b03febf 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>
2009-12-09 10:56:43 +02:00
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