[BusyBox] bug#1226: marked as done (ls column width with BB_FEATURE_AUTOWIDTH broken for short files)

BusyBox.net bug Tracking System owner at busybox.net
Fri Apr 26 19:46:05 UTC 2002


Your message dated Fri, 26 Apr 2002 19:33:46 -0600
with message-id <20020427013346.GB6319 at codepoet.org>
and subject line fixed
has caused the attached bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Erik Andersen
(administrator, BusyBox.net bugs database)

--------------------------------------
Received: (at submit) by bugs.busybox.net; 19 Jan 2002 05:56:30 +0000
>From blythe at routefree.com  Fri Jan 18 22:56:30 2002
Received: from gw2.routefree.net (unknown [209.21.47.227])
	by winder.codepoet.org (Postfix) with ESMTP id C762B15768D
	for <submit at bugs.busybox.net>; Fri, 18 Jan 2002 22:56:29 -0700 (MST)
Received: from banshee.routefree.com ([10.0.0.4] helo=routefree.com)
	by gw2.routefree.net with esmtp (BroadOn)
	id 16RoUJ-0000My-00
	for submit at bugs.busybox.net; Sat, 19 Jan 2002 05:56:23 +0000
Message-ID: <3C490A86.9040105 at routefree.com>
Date: Fri, 18 Jan 2002 21:56:22 -0800
From: David Blythe <blythe at routefree.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: submit at bugs.busybox.net
Subject: ls column width with BB_FEATURE_AUTOWIDTH broken for short files
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Package: busybox
Version: 0.60.2
Severity: normal

ls in a directory (like /) with files with short names ends up listing 
them in a single column due to this errant code snippet (ls.c:437-451):

     column_width= 0;
     for (i=0; i<nfiles; i++) {
         len= strlen(dn[i]->name) +
             ((list_fmt & LIST_INO) ? 8 : 0) +
             ((list_fmt & LIST_BLOCKS) ? 5 : 0)
             ;
         if (column_width < len)
             column_width= len;
     }
     if (column_width >= 6) <----------- Why 6?  Why not 1 ---------->
         ncols = (int)(terminal_width / (column_width + COLUMN_GAP));
     else {
         ncols = 1;
         column_width = COLUMN_WIDTH;
     }

Again, this only happens with BB_FEATURE_AUTOWIDTH
	david

---------------------------------------
Received: (at 1226-done) by bugs.busybox.net; 27 Apr 2002 01:33:47 +0000
>From andersen at codepoet.org  Fri Apr 26 19:33:47 2002
Received: by winder.codepoet.org (Postfix, from userid 1000)
	id 256DB1578F1; Fri, 26 Apr 2002 19:33:47 -0600 (MDT)
Date: Fri, 26 Apr 2002 19:33:46 -0600
From: Erik Andersen <andersen at codepoet.org>
To: 1226-done at bugs.busybox.net
Subject: fixed
Message-ID: <20020427013346.GB6319 at codepoet.org>
Reply-To: andersen at codepoet.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.28i
X-Operating-System: Linux 2.4.18-rmk1, Rebel-NetWinder(Intel StrongARM 110 rev 3), 185.95 BogoMips
X-No-Junk-Mail: I do not want to get *any* junk mail.

Now fixed...

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--



More information about the busybox mailing list