<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/ls.c, branch v7.3</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v7.3</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v7.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2009-04-07T17:57:53Z</updated>
<entry>
<title>maint: Clarify ambiguous refs to Linux kernels or GNU/Linux systems</title>
<updated>2009-04-07T17:57:53Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-04-06T06:43:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=9fdf5845fc87135c4f68bce79f72a25d07130240'/>
<id>urn:sha1:9fdf5845fc87135c4f68bce79f72a25d07130240</id>
<content type='text'>
* README-prereq: s_linux_GNU/Linux_ or s_linux_Linux kernel_
* README-valgrind: ditto
* src/chown-core.c: ditto
* src/dd.c: ditto
* src/df.c: ditto
* src/ls.c: ditto
* src/mv.c: ditto
* src/pwd.c: ditto
* src/remove.c: ditto
* src/shred.c: ditto
* src/stat.c: ditto
* src/su.c: ditto
* src/system.h: ditto
* src/timeout.c: ditto
* src/truncate.c: ditto
</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>
<entry>
<title>doc: Clarify the help for version sorting in ls and sort</title>
<updated>2009-04-02T12:53:43Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-04-01T17:59:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=34f0c3e52208bbd80da4d0be4b5541dca03a6e10'/>
<id>urn:sha1:34f0c3e52208bbd80da4d0be4b5541dca03a6e10</id>
<content type='text'>
* src/ls.c: Update the -v help description
* src/sort.c: Update the -V help description
</content>
</entry>
<entry>
<title>ls: make it possible to disable coloring of hard links</title>
<updated>2009-03-24T16:11:00Z</updated>
<author>
<name>Kamil Dudka</name>
<email>kdudka@redhat.com</email>
</author>
<published>2009-03-24T11:16:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=2827bb5704a153a0b4ac9c4af8b83ed015012f68'/>
<id>urn:sha1:2827bb5704a153a0b4ac9c4af8b83ed015012f68</id>
<content type='text'>
* src/ls.c (print_color_indicator): Don't color hard links if disabled
(when there is an empty hl= in the LS_COLORS environment variable).
* tests/ls/hardlink: Add test case for disabled hard link highlighting.
* NEWS: Mention the change.
</content>
</entry>
<entry>
<title>maint: avoid new unused-macro warnings from gcc</title>
<updated>2009-03-06T10:49:46Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-03-06T09:49:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=8b638f994abefde84746b3d8a08893c9ffeb7799'/>
<id>urn:sha1:8b638f994abefde84746b3d8a08893c9ffeb7799</id>
<content type='text'>
* src/ls.c (ASSERT_MATCHING_DEV_INO): Comment-out unused definition,
to match commented-out use.
* src/install.c (INITIAL_HASH_MODULE, INITIAL_ENTRY_TAB_SIZE):
(READ_SIZE): Remove definitions of unused macros.
* src/mv.c (INITIAL_HASH_MODULE, INITIAL_ENTRY_TAB_SIZE): Likewise.
* src/dd.c (max): Likewise.
* src/expand.c (OUTPUT_BLOCK): Likewise.
* src/csplit.c (ALLOC_SIZE): Likewise.
* src/pr.c (NULLCOL): Likewise.
* src/ptx.c (Sword): Likewise.
* src/unexpand.c (OUTPUT_BLOCK): Likewise.
* src/factor.c (NDEBUG): Likewise.
</content>
</entry>
<entry>
<title>doc: ls: clarify description of -s</title>
<updated>2009-02-20T18:32:02Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-02-20T18:31:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=2061cd8aa64454d689a4de600aa515781cf346c2'/>
<id>urn:sha1:2061cd8aa64454d689a4de600aa515781cf346c2</id>
<content type='text'>
* src/ls.c (usage): Make the description of -s mention "allocated size",
so that it's less likely to be confused with an apparent byte-count.
Suggested by Vito Caputo.
</content>
</entry>
<entry>
<title>ls: clean up after wrapped+colored file names with clear-to-EOL</title>
<updated>2009-02-10T13:47:39Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-12-31T18:17:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=adc62b5d9f3b4ab575c57b1b76eb6ad257a09f2c'/>
<id>urn:sha1:adc62b5d9f3b4ab575c57b1b76eb6ad257a09f2c</id>
<content type='text'>
This change addresses a relatively unusual case: ls --color, with
a highlighted name being printed initially in the last row of a
terminal emulator (possibly followed by other lines of output) such
that it is wrapped onto the following line, as the terminal emulator
scrolls the output.  That would cause the entire following line to
be highlighted, even if the name happened to use only one position.
The least-invasive patch would have made colorized output larger for
all uses.  The approach taken below is more invasive, but limits the
increase in overhead to only those lines that are expected to wrap.
* src/ls.c (enum indicator_no): Add C_CLR_TO_EOL.
(indicator_name): Add "cl".
(color_indicator): Add default escape codes for "cl".
(print_long_format): Propagate width to print_name_with_quoting.
(print_name_with_quoting): Print new C_CLR_TO_EOL string if needed.
Return the width of what we're printing.
(print_file_name_and_frills): Propagate width.
(print_type_indicator): Return bool (aka width).
(print_many_per_line): Pass column position to print_* function.
(print_current_files): Likewise.
(print_horizontal): Likewise.
(print_with_commas): Likewise.
* src/dircolors.c (slack_codes): Add "CLRTOEOL".
(ls_codes): Add "cl".
* tests/ls/color-clear-to-eol: New file.  Test for this fix.
* tests/Makefile.am (TESTS): Add ls/color-clear-to-eol.
* THANKS: Update.
Reported by Alexander V. Lukyanov.  See thread for details:
http://thread.gmane.org/gmane.linux.kernel/740021/focus=14824
Thanks to Jan Engelhardt for helping me reproduce the problem.

Demonstrate with this in an 80-column xterm:
  seq 200 # to start in the "bottom" row
  touch zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.foo
  env LS_COLORS='*.foo=0;31;42' ls -og --color=always

Before the fix, you'd see something like this:
(where the file name is printed in red on a green background,
and each "=" denotes a space on a green background)
...
  -rw-r--r--  1       0 Feb  5 11:31 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\
  zzzzzzzzzzzzzz.foo===================================================

After the patch, the trailing green spaces are gone:

  -rw-r--r--  1       0 Feb  5 11:31 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\
  zzzzzzzzzzzzzz.foo
</content>
</entry>
<entry>
<title>cleanup/modernize: don't test HAVE_MBRTOWC; now gnulib provides it</title>
<updated>2009-01-01T01:15:07Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-12-23T18:06:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=92465d59c678c5a8e8c4c0985eb6ecec4c391df9'/>
<id>urn:sha1:92465d59c678c5a8e8c4c0985eb6ecec4c391df9</id>
<content type='text'>
* bootstrap.conf (gnulib_modules): Include mbrtowc explicitly.
* src/ls.c (quote_name): Don't test HAVE_MBRTOWC, now that we're
guaranteed to have the function.
* src/wc.c (wc): Likewise.
</content>
</entry>
<entry>
<title>avoid warnings about initialization of automatic aggregates</title>
<updated>2008-12-01T20:18:52Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-11-30T21:37:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c58b5daa337b16416be50adfeb3e99e3c009c891'/>
<id>urn:sha1:c58b5daa337b16416be50adfeb3e99e3c009c891</id>
<content type='text'>
* src/system.h (DZA_CONCAT0, DZA_CONCAT): New macros.
(DECLARE_ZEROED_AGGREGATE): New macro.
* src/ls.c (quote_name): Use it.
* src/pathchk.c (portable_chars_only): Use it.
* src/shred.c (main): Use it.
* src/stty.c (main): Use it.
* src/wc.c (SUPPORT_OLD_MBRTOWC): Use it.
</content>
</entry>
<entry>
<title>make --help print "Report PROGRAM translation bugs to &lt;...&gt;."</title>
<updated>2008-11-10T07:19:52Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-11-09T16:15:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=43448b049341d9b88293f38eb941759820f42e84'/>
<id>urn:sha1:43448b049341d9b88293f38eb941759820f42e84</id>
<content type='text'>
for all but the C/POSIX locale.
* src/system.h: Include "hard-locale.h".
(emit_bug_reporting_address): Tell where to report translation bugs.

don't include "hard-locale.h", now that system.h does
* src/comm.c: Likewise.
* src/join.c: Likewise.
* src/ls.c: Likewise.
* src/pinky.c: Likewise.
* src/pr.c: Likewise.
* src/sort.c: Likewise.
* src/uniq.c: Likewise.
* src/who.c: Likewise.
</content>
</entry>
</feed>
