Buglet: 'tabstops' is unused if BB_FEATURE_AUTOWIDTH is not defined.

This commit is contained in:
Mark Whitley 2001-02-01 19:39:43 +00:00
parent f2cc2762bb
commit 9b300d0b1f
2 changed files with 10 additions and 12 deletions

View File

@ -735,13 +735,12 @@ extern int ls_main(int argc, char **argv)
time_fmt= TIME_MOD;
#endif
#ifdef BB_FEATURE_AUTOWIDTH
ioctl(fileno(stdout), TIOCGWINSZ, &win);
if (win.ws_row > 4)
column_width = win.ws_row - 2;
if (win.ws_col > 0)
terminal_width = win.ws_col - 1;
ioctl(fileno(stdout), TIOCGWINSZ, &win);
if (win.ws_row > 4)
column_width = win.ws_row - 2;
if (win.ws_col > 0)
terminal_width = win.ws_col - 1;
#endif
tabstops = 8;
nfiles=0;
/* process options */

11
ls.c
View File

@ -735,13 +735,12 @@ extern int ls_main(int argc, char **argv)
time_fmt= TIME_MOD;
#endif
#ifdef BB_FEATURE_AUTOWIDTH
ioctl(fileno(stdout), TIOCGWINSZ, &win);
if (win.ws_row > 4)
column_width = win.ws_row - 2;
if (win.ws_col > 0)
terminal_width = win.ws_col - 1;
ioctl(fileno(stdout), TIOCGWINSZ, &win);
if (win.ws_row > 4)
column_width = win.ws_row - 2;
if (win.ws_col > 0)
terminal_width = win.ws_col - 1;
#endif
tabstops = 8;
nfiles=0;
/* process options */