<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/gl/modules/mbsalign, branch v9.4</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v9.4</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v9.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2021-11-01T05:36:46Z</updated>
<entry>
<title>maint: use minmax.h instead of rolling our own</title>
<updated>2021-11-01T05:36:46Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2021-11-01T05:30:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ea024067488e4ed7eb0038af8059b2d7ab16f1ff'/>
<id>urn:sha1:ea024067488e4ed7eb0038af8059b2d7ab16f1ff</id>
<content type='text'>
* gl/lib/mbsalign.c, gl/lib/randread.c, src/system.h (MAX, MIN):
Remove; include minmax.h instead.
* gl/modules/mbsalign, gl/modules/randread (Depends-on): Add minmax.
* src/factor.c (MIN): Remove.
</content>
</entry>
<entry>
<title>mbsalign: avoid warning with Solaris 10 cc</title>
<updated>2010-10-14T05:41:17Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2010-10-14T03:39:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=4015f93d3052b6b11ed5dbcdc032be324a084f07'/>
<id>urn:sha1:4015f93d3052b6b11ed5dbcdc032be324a084f07</id>
<content type='text'>
* gl/lib/mbsalign.c: Include &lt;stdint.h&gt; for SIZE_MAX.
Use SIZE_MAX rather than (size_t) -1, to avoid warning for
"size_t x = -1" on Solaris 10 cc.
* gl/modules/mbsalign (Depends-on): Add stdint.
</content>
</entry>
<entry>
<title>ls: fix alignment when month names have varying widths</title>
<updated>2009-04-02T23:34:11Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-03-24T14:29:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=612b647dd16d5abc03b295abe42d8b4a0fe660f7'/>
<id>urn:sha1:612b647dd16d5abc03b295abe42d8b4a0fe660f7</id>
<content type='text'>
Reported by Samuel Thibault and Stéphane Raimbault, as the glibc fr_FR
locale has recently changed to use the official but variable width
abbreviated month names. Other glibc locales also have variable widths.
http://sourceware.org/ml/libc-locales/2008-q1/msg00035.html
http://sourceware.org/bugzilla/show_bug.cgi?id=9859
* NEWS: Mention the fix
* gl/lib/mbsalign.c: A new module to align and truncate a
string in a specified number of screen cells, while handling
multi-byte characters appropriately.
* gl/lib/mbsalign.h: Ditto
* gl/modules/mbsalign: Ditto
* bootstrap.conf: Reference the new module
* src/ls.c (abmon_init): New function, precompute the abbreviated
months aligned left in a minimum width column &lt;= 5 screen cells.
(align_nstrftime): New function, replace the first %b in the
format specification to strftime with the precomputed month string.
Note using the cached month strings speeds up `ls -lU` by around 17%
on glibc-2.7-2 on linux at least.  Also if we implement this function
using heap storage rather than automatic storage, and use snprintf
instead of strcpy, ls will slow down by 2% and 1% respectively
(i.e. a net gain of 14% rather than 17%).
* tests/ls/abmon-align: A new test to test ls alignment for
various formats and locales
* tests/Makefile.am: Reference the new test
</content>
</entry>
</feed>
