xz-analysis-mirror/m4
Lasse Collin bb0b1004f8 xz: Multiple fixes.
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-10 10:30:33 +03:00
..
.gitignore add gitignore files 2009-02-07 20:26:09 +02:00
acx_pthread.m4 Imported to git. 2007-12-09 00:42:33 +02:00
getopt.m4 Fix the Autoconf test for getopt_long replacement. 2009-03-01 08:58:41 +02:00
posix-shell.m4 Major update to the xzgrep and other scripts based on 2009-07-05 22:25:17 +03:00
tuklib_common.m4 Various changes. 2009-09-19 09:47:30 +03:00
tuklib_cpucores.m4 Updates to tuklib_physmem and tuklib_cpucores. 2010-05-10 19:54:15 +03:00
tuklib_integer.m4 Use a tuklib module for integer handling. 2009-10-04 22:57:12 +03:00
tuklib_mbstr.m4 xz: Multiple fixes. 2010-09-10 10:30:33 +03:00
tuklib_physmem.m4 Updates to tuklib_physmem and tuklib_cpucores. 2010-05-10 19:54:15 +03:00
tuklib_progname.m4 Various changes. 2009-09-19 09:47:30 +03:00