[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [BusyBox] bug#1226: ls column width with BB_FEATURE_AUTOWIDTH broken for short files
From: David Blythe <blythe () routefree ! com>
Date: 2002-01-18 23:01:03
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic