[hackers] [sbase] Revert "ls: only display directory headers when more than one directory is specified" || Michael Forney

From: <git_AT_suckless.org>
Date: Sat, 9 Jul 2016 11:09:57 +0200 (CEST)

commit e8e9b97baf42525ee884c6dd6863c8694a81b13a
Author: Michael Forney <mforney_AT_mforney.org>
AuthorDate: Sat May 14 18:56:51 2016 -0700
Commit: sin <sin_AT_2f30.org>
CommitDate: Sat Jul 9 10:09:50 2016 +0100

    Revert "ls: only display directory headers when more than one directory is specified"
    
    This reverts commit b107489bf2cda579ca53551206270b9eee80c059.

diff --git a/ls.c b/ls.c
index a59cc0a..55dfe40 100644
--- a/ls.c
+++ b/ls.c
_AT_@ -53,7 +53,6 @@ static int Uflag = 0;
 static int uflag = 0;
 static int first = 1;
 static char sort = 0;
-static size_t ds = 0;
 
 static void ls(const char *, const struct entry *, int);
 
_AT_@ -278,7 +277,7 @@ lsdir(const char *path, const struct entry *dir)
         if (!Uflag)
                 qsort(ents, n, sizeof(*ents), entcmp);
 
- if (ds > 1 && (path[0] || dir->name[0] != '.'))
+ if (path[0] || dir->name[0] != '.')
                 printf("%s:\n", dir->name);
         for (i = 0; i < n; i++)
                 output(&ents[i]);
_AT_@ -369,7 +368,7 @@ int
 main(int argc, char *argv[])
 {
         struct entry ent, *dents, *fents;
- size_t i, fs;
+ size_t i, ds, fs;
 
         ARGBEGIN {
         case '1':
Received on Sat Jul 09 2016 - 11:09:57 CEST

This archive was generated by hypermail 2.3.0 : Sat Jul 09 2016 - 11:13:26 CEST