aboutsummaryrefslogtreecommitdiff
path: root/ls.c
diff options
context:
space:
mode:
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 080768027..64e5bf828 100644
--- a/ls.c
+++ b/ls.c
@@ -171,6 +171,8 @@ static unsigned short column = 0;
171static unsigned short terminal_width; 171static unsigned short terminal_width;
172static unsigned short column_width; 172static unsigned short column_width;
173static unsigned short tabstops; 173static unsigned short tabstops;
174#else
175# define column_width COLUMN_WIDTH
174#endif 176#endif
175 177
176static int status = EXIT_SUCCESS; 178static int status = EXIT_SUCCESS;
@@ -236,7 +238,7 @@ static void nexttabstop( void )
236 column++; 238 column++;
237 } 239 }
238 } 240 }
239 nexttab= column + column_width + COLUMN_GAP ; 241 nexttab= column + column_width + COLUMN_GAP;
240} 242}
241 243
242/*----------------------------------------------------------------------*/ 244/*----------------------------------------------------------------------*/
@@ -429,8 +431,10 @@ void showfiles(struct dnode **dn, int nfiles)
429 ; 431 ;
430 if (column_width < len) column_width= len; 432 if (column_width < len) column_width= len;
431 } 433 }
432#endif
433 ncols= (int)(terminal_width / (column_width + COLUMN_GAP)); 434 ncols= (int)(terminal_width / (column_width + COLUMN_GAP));
435#else
436 ncols= TERMINAL_WIDTH;
437#endif
434 switch (style_fmt) { 438 switch (style_fmt) {
435 case STYLE_LONG: /* one record per line, extended info */ 439 case STYLE_LONG: /* one record per line, extended info */
436 case STYLE_SINGLE: /* one record per line */ 440 case STYLE_SINGLE: /* one record per line */