<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/ls.c, branch v7.2</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v7.2</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v7.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2009-03-24T16:11:00Z</updated>
<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>
<entry>
<title>avoid warnings about discarding "qualifiers from pointer target type"</title>
<updated>2008-11-10T07:11:59Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-10-28T21:06:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=854284f7887677395239c1085b27a09e834291b7'/>
<id>urn:sha1:854284f7887677395239c1085b27a09e834291b7</id>
<content type='text'>
Use the new "bad_cast" function or an actual cast-to-"(char *)"
to avoid warnings.
* src/system.h (bad_cast): Define.
* src/chown.c (main):
* src/chroot.c (main):
* src/date.c (main):
* src/du.c (main):
* src/expand.c (stdin_argv):
* src/ls.c (decode_switches):
* src/md5sum.c (main):
* src/paste.c (main):
* src/pr.c (col_sep_string, column_separator, line_separator, main):
* src/sort.c (main):
* src/split.c (main):
* src/tail.c (main):
* src/unexpand.c (stdin_argv):
* src/yes.c (main):
</content>
</entry>
<entry>
<title>ls: --color now highlights hard linked files, too</title>
<updated>2008-10-28T20:08:30Z</updated>
<author>
<name>Kamil Dudka</name>
<email>kdudka@redhat.com</email>
</author>
<published>2008-10-27T14:38:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=1e48b1fee5fa2ad2d1802771eafbfcddb38a24cb'/>
<id>urn:sha1:1e48b1fee5fa2ad2d1802771eafbfcddb38a24cb</id>
<content type='text'>
* src/ls.c (print_color_indicator): Colorize hard linked files.
* src/dircolors.c: Add color for hard link.
* src/dircolors.hin: Add color for hard link.
* tests/ls/hardlink: Test for ls - colorize hard linked files.
* tests/Makefile.am (TESTS): Add ls/hardlink.
* NEWS: Mention the change.
</content>
</entry>
<entry>
<title>ls: use '.' (not +) as SELinux-only alt. access flag in ls -l output</title>
<updated>2008-10-23T12:18:25Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-04-02T20:26:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b3677e5e383103bf1764b2c8a9329b1c17934b24'/>
<id>urn:sha1:b3677e5e383103bf1764b2c8a9329b1c17934b24</id>
<content type='text'>
* src/ls.c (gobble_file) [long_format]: Map SELinux-only to '.',
any other nonempty combination of MAC and ACL to '+', and all else
to the usual ' '.  Suggested by Michael Stone.
* tests/misc/selinux: Adapt: expect '.', not '+'.
* doc/coreutils.texi (What information is listed): Document this.
* NEWS (Changes in behavior): Mention it.
</content>
</entry>
</feed>
