summaryrefslogtreecommitdiff
path: root/ls.c
diff options
context:
space:
mode:
authorEric Andersen2001-01-24 23:34:48 +0000
committerEric Andersen2001-01-24 23:34:48 +0000
commitf5d5e77321ad32b3952dcdf21d14fd0ef3d4c1a9 (patch)
treebc91a3dbedbdfc52a5ade52815d241d2f1100082 /ls.c
parent26439a2991f81b52c93b1e81d16f328f359a6611 (diff)
downloadbusybox-f5d5e77321ad32b3952dcdf21d14fd0ef3d4c1a9.zip
busybox-f5d5e77321ad32b3952dcdf21d14fd0ef3d4c1a9.tar.gz
more bugs fixed -- found doing regression testing
-Erik
Diffstat (limited to 'ls.c')
-rw-r--r--ls.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ls.c b/ls.c
index 0807680..64e5bf8 100644
--- a/ls.c
+++ b/ls.c
@@ -171,6 +171,8 @@ static unsigned short column = 0;
static unsigned short terminal_width;
static unsigned short column_width;
static unsigned short tabstops;
+#else
+# define column_width COLUMN_WIDTH
#endif
static int status = EXIT_SUCCESS;
@@ -236,7 +238,7 @@ static void nexttabstop( void )
column++;
}
}
- nexttab= column + column_width + COLUMN_GAP ;
+ nexttab= column + column_width + COLUMN_GAP;
}
/*----------------------------------------------------------------------*/
@@ -429,8 +431,10 @@ void showfiles(struct dnode **dn, int nfiles)
;
if (column_width < len) column_width= len;
}
-#endif
ncols= (int)(terminal_width / (column_width + COLUMN_GAP));
+#else
+ ncols= TERMINAL_WIDTH;
+#endif
switch (style_fmt) {
case STYLE_LONG: /* one record per line, extended info */
case STYLE_SINGLE: /* one record per line */