On 2012-11-08, Greg Lehey wrote:
> New Revision: 242725

> -     return (strcoll(a->fts_name, b->fts_name));
> +        if (f_samesort)
> +             return (strcoll(b->fts_name, a->fts_name));
> +        else
> +             return (strcoll(a->fts_name, b->fts_name));

Please use tabs instead of spaces in indentations. Similarly in r242722.

This patch should fix some whitespace problems:

%%%
Index: bin/ls/ls.c
===================================================================
--- bin/ls/ls.c (revision 242746)
+++ bin/ls/ls.c (working copy)
@@ -185,7 +185,7 @@ main(int argc, char *argv[])
        fts_options = FTS_PHYSICAL;
        if (getenv("LS_SAMESORT"))
                f_samesort = 1;
-       while ((ch = getopt(argc, argv,
+       while ((ch = getopt(argc, argv,
            "1ABCD:FGHILPRSTUWXZabcdfghiklmnopqrstuwxy,")) != -1) {
                switch (ch) {
                /*
@@ -241,7 +241,7 @@ main(int argc, char *argv[])
                        f_timesort = 1;
                        f_sizesort = 0;
                        break;
-                /* Other flags.  Please keep alphabetic. */
+               /* Other flags.  Please keep alphabetic. */
                case ',':
                        f_thousands = 1;
                        break;
@@ -250,10 +250,10 @@ main(int argc, char *argv[])
                        f_octal = 1;
                        f_octal_escape = 0;
                        break;
-                case 'D':
-                        f_timeformat = optarg;
-                        break;
-                case 'F':
+               case 'D':
+                       f_timeformat = optarg;
+                       break;
+               case 'F':
                        f_type = 1;
                        f_slash = 0;
                        break;
@@ -861,7 +861,7 @@ label_out:
                        d.s_size = sizelen;
                d.s_user = maxuser;
        }
-        if (f_thousands)                        /* make space for commas */
+       if (f_thousands)                        /* make space for commas */
                d.s_size += (d.s_size - 1) / 3;
        printfcn(&d);
        output = 1;
Index: bin/ls/cmp.c
===================================================================
--- bin/ls/cmp.c        (revision 242746)
+++ bin/ls/cmp.c        (working copy)
@@ -78,9 +78,9 @@ modcmp(const FTSENT *a, const FTSENT *b)
        if (b->fts_statp->st_mtim.tv_nsec <
            a->fts_statp->st_mtim.tv_nsec)
                return (-1);
-        if (f_samesort)
+       if (f_samesort)
                return (strcoll(b->fts_name, a->fts_name));
-        else
+       else
                return (strcoll(a->fts_name, b->fts_name));
 }
 
@@ -107,9 +107,9 @@ acccmp(const FTSENT *a, const FTSENT *b)
        if (b->fts_statp->st_atim.tv_nsec <
            a->fts_statp->st_atim.tv_nsec)
                return (-1);
-        if (f_samesort)
+       if (f_samesort)
                return (strcoll(b->fts_name, a->fts_name));
-        else
+       else
                return (strcoll(a->fts_name, b->fts_name));
 }
 
@@ -136,9 +136,9 @@ birthcmp(const FTSENT *a, const FTSENT *
        if (b->fts_statp->st_birthtim.tv_nsec <
            a->fts_statp->st_birthtim.tv_nsec)
                return (-1);
-        if (f_samesort)
+       if (f_samesort)
                return (strcoll(b->fts_name, a->fts_name));
-        else
+       else
                return (strcoll(a->fts_name, b->fts_name));
 }
 
@@ -165,9 +165,9 @@ statcmp(const FTSENT *a, const FTSENT *b
        if (b->fts_statp->st_ctim.tv_nsec <
            a->fts_statp->st_ctim.tv_nsec)
                return (-1);
-        if (f_samesort)
+       if (f_samesort)
                return (strcoll(b->fts_name, a->fts_name));
-        else
+       else
                return (strcoll(a->fts_name, b->fts_name));
 }
 
%%%

-- 
Jaakko
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to