summaryrefslogtreecommitdiff
path: root/src/ls.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-05-01 02:08:30 +0000
committerJim Meyering <jim@meyering.net>1999-05-01 02:08:30 +0000
commit6faa50c13511e585536af3f37d6df11a789b796a (patch)
tree7d4562cdf96afc40deed7247952ebb2c0eee7afc /src/ls.c
parent9fca49f67c16c8b42c32e185808fe187cedb0fa7 (diff)
downloadcoreutils-6faa50c13511e585536af3f37d6df11a789b796a.tar.xz
(decode_switches): Use STDIN_FILENO, STDOUT_FILENO instead of 0, 1.
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ls.c b/src/ls.c
index 6ebdeb52d..a657ebf51 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -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;