summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-08-29 17:57:34 +0000
committerJim Meyering <jim@meyering.net>1998-08-29 17:57:34 +0000
commitf9abdd4a4782cd828243e0f32651e76a3d889b25 (patch)
tree6cf03d5e2ddca39e9b2ff36d7d2c9516926b01b6 /src
parentc7f7a81276d58c54ec328218d0387c8e97bdfe89 (diff)
downloadcoreutils-f9abdd4a4782cd828243e0f32651e76a3d889b25.tar.xz
(print_dir_name): Remove global variable.
(print_dir): When trace_dirs is set, always print the directory name header.
Diffstat (limited to 'src')
-rw-r--r--src/ls.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/ls.c b/src/ls.c
index 1d311c8c5..ba604239a 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -474,10 +474,6 @@ static int tabsize;
static int dir_defaulted;
-/* Nonzero means print each directory name before listing it. */
-
-static int print_dir_name;
-
/* The line length to use for breaking lines in many-per-line format.
Can be set with -w. */
@@ -687,7 +683,6 @@ main (int argc, char **argv)
exit_status = 0;
dir_defaulted = 1;
- print_dir_name = 1;
pending_dirs = 0;
current_time = time ((time_t *) 0);
@@ -758,8 +753,6 @@ main (int argc, char **argv)
if (pending_dirs)
DIRED_PUTCHAR ('\n');
}
- else if (pending_dirs && pending_dirs->next == 0)
- print_dir_name = 0;
while (pending_dirs)
{
@@ -770,7 +763,6 @@ main (int argc, char **argv)
if (thispend->realname)
free (thispend->realname);
free (thispend);
- print_dir_name = 1;
}
if (dired && format == long_format)
@@ -1589,10 +1581,8 @@ print_dir (const char *name, const char *realname)
contents listed rather than being mentioned here as files. */
if (trace_dirs)
- extract_dirs_from_files (name, 1);
-
- if (print_dir_name)
{
+ extract_dirs_from_files (name, 1);
DIRED_INDENT ();
PUSH_CURRENT_DIRED_POS (&subdired_obstack);
dired_pos += quote_name (stdout, realname ? realname : name,