aboutsummaryrefslogtreecommitdiff
path: root/src/xz/list.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-06-24xz: Change io_seek_src and io_pread arguments from off_t to uint64_t.Lasse Collin1-5/+4
This helps fixing warnings from -Wsign-conversion and makes the code look better too.
2019-06-24xz: list.c: Fix some warnings from -Wsign-conversion.Lasse Collin1-3/+4
2019-05-11spellingAntoine Cœur1-2/+2
2019-05-01xz: In xz -lvv look at the widths of the check names too.Lasse Collin1-6/+26
Now the widths of the check names is used to adjust the width of the Check column. This way there no longer is a need to restrict the widths of the check names to be at most ten terminal-columns.
2019-05-01xz: Fix xz -lvv column alignment to look at the translated strings.Lasse Collin1-2/+2
2019-03-04xz: Automatically align column headings in xz -lvv.Lasse Collin1-51/+212
2019-03-04xz: Automatically align strings ending in a colon in --list output.Lasse Collin1-12/+102
This should avoid alignment errors in translations with these strings.
2017-08-14Fix or hide warnings from GCC 7's -Wimplicit-fallthrough.Lasse Collin1-0/+2
2017-05-23xz: Fix "xz --list --robot missing_or_bad_file.xz".Lasse Collin1-2/+6
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.
2017-04-24xz: Use lzma_file_info_decoder() for --list.Lasse Collin1-210/+44
2013-06-26xz: Check the value of lzma_stream_flags.version in --list.Lasse Collin1-0/+14
It is a no-op for now, but if an old xz version is used together with a newer liblzma that supports something new, then this check becomes important and will stop the old xz from trying to parse files that it won't understand.
2013-06-23xz: Validate Uncompressed Size from Block Header in list.c.Lasse Collin1-1/+13
This affects only "xz -lvv". Normal decompression with xz already detected if Block Header and Index had mismatched Uncompressed Size fields. So this just makes "xz -lvv" show such files as corrupt instead of showing the Uncompressed Size from Index.
2012-07-04xz: Fix the version number printed by xz -lvv.Lasse Collin1-3/+3
The decoder bug was fixed in 5.0.2 instead of 5.0.3.
2011-11-07xz: Show minimum required XZ Utils version in xz -lvv.Lasse Collin1-6/+57
Man page wasn't updated yet.
2011-05-27xz: Fix error handling in xz -lvv.Lasse Collin1-15/+6
It could do an invalid free() and read past the end of the uninitialized filters array.
2010-09-15xz: Edit a translators comment.Lasse Collin1-1/+1
2010-09-10xz: Multiple fixes.Lasse Collin1-66/+139
The code assumed that printing numbers with thousand separators and decimal points would always produce only US-ASCII characters. This was used for buffer sizes (with snprintf(), no overflows) and aligning columns of the progress indicator and --list. That assumption was wrong (e.g. LC_ALL=fi_FI.UTF-8 with glibc), so multibyte character support was added in this commit. The old way is used if the operating system doesn't have enough multibyte support (e.g. lacks wcwidth()). The sizes of buffers were increased to accomodate multibyte characters. I don't know how big they should be exactly, but they aren't used for anything critical, so it's not too bad. If they still aren't big enough, I hopefully get a bug report. snprintf() takes care of avoiding buffer overflows. Some static buffers were replaced with buffers allocated on stack. double_to_str() was removed. uint64_to_str() and uint64_to_nicestr() now share the static buffer and test for thousand separator support. Integrity check names "None" and "Unknown-N" (2 <= N <= 15) were marked to be translated. I had forgot these, plus they wouldn't have worked correctly anyway before this commit, because printing tables with multibyte strings didn't work. Thanks to Marek Černocký for reporting the bug about misaligned table columns in --list output.
2010-09-07Fix use of N_() and ngettext().Lasse Collin1-2/+2
I had somehow thought that N_() is usually used as shorthand for ngettext(). This also fixes a missing \n from a call to ngettext().
2010-09-05xz: Hopefully ease translating the messages in list.c.Lasse Collin1-10/+23
2010-08-07Disable the memory usage limiter by default.Lasse Collin1-1/+1
For several people, the limiter causes bigger problems that it solves, so it is better to have it disabled by default. Those who want to have a limiter by default need to enable it via the environment variable XZ_DEFAULTS. Support for environment variable XZ_DEFAULTS was added. It is parsed before XZ_OPT and technically identical with it. The intended uses differ quite a bit though; see the man page. The memory usage limit can now be set separately for compression and decompression using --memlimit-compress and --memlimit-decompress. To set both at once, -M or --memlimit can be used. --memory was retained as a legacy alias for --memlimit for backwards compatibility. The semantics of --info-memory were changed in backwards incompatible way. Compatibility wasn't meaningful due to changes in the memory usage limiter functionality. The memory usage limiter info is no longer shown at the bottom of xz --long -help. The memory usage limiter support for removed completely from xzdec. xz's man page was updated to match the above changes. Various unrelated fixes were also made to the man page.
2010-06-01Major update to xz --list.Lasse Collin1-181/+471
2010-05-27Use my_min() instead of MIN() in src/xz/list.cJonathan Nieder1-1/+1
This should have been done in 920a69a8d8e4203c5edddd829d932130eac188ea.
2010-02-01Fix typos in comments.Lasse Collin1-1/+1
2010-01-31Delay opening the destionation file and other fixes.Lasse Collin1-19/+9
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.
2010-01-24Add initial version of xz --list.Lasse Collin1-353/+635
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.
2009-04-13Put the interesting parts of XZ Utils into the public domain.Lasse Collin1-10/+3
Some minor documentation cleanups were made at the same time.
2008-11-19Renamed lzma to xz and lzmadec to xzdec. We create symlinksLasse Collin1-0/+477
lzma, unlzma, and lzcat in "make install" for backwards compatibility with LZMA Utils 4.32.x; I'm not sure if this should be the default though.