diff options
author | Jim Meyering <jim@meyering.net> | 1999-05-01 02:08:30 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-05-01 02:08:30 +0000 |
commit | 6faa50c13511e585536af3f37d6df11a789b796a (patch) | |
tree | 7d4562cdf96afc40deed7247952ebb2c0eee7afc /src | |
parent | 9fca49f67c16c8b42c32e185808fe187cedb0fa7 (diff) | |
download | coreutils-6faa50c13511e585536af3f37d6df11a789b796a.tar.xz |
(decode_switches): Use STDIN_FILENO, STDOUT_FILENO instead of 0, 1.
Diffstat (limited to 'src')
-rw-r--r-- | src/ls.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -872,7 +872,7 @@ decode_switches (int argc, char **argv) case LS_LS: /* This is for the `ls' program. */ - if (isatty (1)) + if (isatty (STDOUT_FILENO)) { format = many_per_line; /* See description of qmark_funny_chars, above. */ @@ -931,7 +931,7 @@ decode_switches (int argc, char **argv) { struct winsize ws; - if (ioctl (1, TIOCGWINSZ, &ws) != -1 && ws.ws_col != 0) + if (ioctl (STDOUT_FILENO, TIOCGWINSZ, &ws) != -1 && ws.ws_col != 0) line_length = ws.ws_col; } #endif @@ -988,7 +988,7 @@ decode_switches (int argc, char **argv) sort_type = sort_none; /* disable -l */ if (format == long_format) - format = (isatty (1) ? many_per_line : one_per_line); + format = (isatty (STDOUT_FILENO) ? many_per_line : one_per_line); print_block_size = 0; /* disable -s */ print_with_color = 0; /* disable --color */ break; |