Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Nov 2012 23:45:19 +0000 (UTC)
From:      Greg Lehey <grog@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r242807 - head/bin/ls
Message-ID:  <201211082345.qA8NjJaP049900@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: grog
Date: Thu Nov  8 23:45:19 2012
New Revision: 242807
URL: http://svnweb.freebsd.org/changeset/base/242807

Log:
  Replace spaces with tabs where appropriate.
  
  Reminded by: jh@

Modified:
  head/bin/ls/cmp.c
  head/bin/ls/extern.h
  head/bin/ls/ls.c
  head/bin/ls/ls.h
  head/bin/ls/print.c
  head/bin/ls/util.c

Modified: head/bin/ls/cmp.c
==============================================================================
--- head/bin/ls/cmp.c	Thu Nov  8 23:42:22 2012	(r242806)
+++ head/bin/ls/cmp.c	Thu Nov  8 23:45:19 2012	(r242807)
@@ -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));
 }
 

Modified: head/bin/ls/extern.h
==============================================================================
--- head/bin/ls/extern.h	Thu Nov  8 23:42:22 2012	(r242806)
+++ head/bin/ls/extern.h	Thu Nov  8 23:45:19 2012	(r242807)
@@ -55,12 +55,12 @@ int	 prn_octal(const char *);
 int	 prn_printable(const char *);
 #ifdef COLORLS
 void	 parsecolors(const char *cs);
-void     colorquit(int);
+void	 colorquit(int);
 
-extern  char    *ansi_fgcol;
-extern  char    *ansi_bgcol;
-extern  char    *ansi_coloff;
-extern  char    *attrs_off;
-extern  char    *enter_bold;
+extern	char	*ansi_fgcol;
+extern	char	*ansi_bgcol;
+extern	char	*ansi_coloff;
+extern	char	*attrs_off;
+extern	char	*enter_bold;
 #endif
 extern int	termwidth;

Modified: head/bin/ls/ls.c
==============================================================================
--- head/bin/ls/ls.c	Thu Nov  8 23:42:22 2012	(r242806)
+++ head/bin/ls/ls.c	Thu Nov  8 23:45:19 2012	(r242807)
@@ -78,7 +78,7 @@ __FBSDID("$FreeBSD$");
 #define	STRBUF_SIZEOF(t)	(1 + CHAR_BIT * sizeof(t) / 3 + 1)
 
 /*
- * MAKENINES(n) turns n into (10**n)-1.  This is useful for converting a width
+ * MAKENINES(n) turns n into (10**n)-1.	 This is useful for converting a width
  * into a number that wide in decimal.
  * XXX: Overflows are not considered.
  */
@@ -133,7 +133,7 @@ static int f_sizesort;
        int f_statustime;	/* use time of last mode change */
 static int f_stream;		/* stream the output, separate with commas */
        int f_thousands;		/* show file sizes with thousands separators */
-       char *f_timeformat;      /* user-specified time format */
+       char *f_timeformat;	/* user-specified time format */
 static int f_timesort;		/* sort by time vice name */
        int f_type;		/* add type character for non-regular files */
 static int f_whiteout;		/* show whiteout entries */
@@ -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;
@@ -534,7 +534,7 @@ traverse(int argc, char *argv[], int opt
 
 			/*
 			 * If already output something, put out a newline as
-			 * a separator.  If multiple arguments, precede each
+			 * a separator.	 If multiple arguments, precede each
 			 * directory with its name.
 			 */
 			if (output) {
@@ -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;
@@ -874,7 +874,7 @@ label_out:
 /*
  * Ordering for mastercmp:
  * If ordering the argv (fts_level = FTS_ROOTLEVEL) return non-directories
- * as larger than directories.  Within either group, use the sort function.
+ * as larger than directories.	Within either group, use the sort function.
  * All other levels use the sort function.  Error entries remain unsorted.
  */
 static int

Modified: head/bin/ls/ls.h
==============================================================================
--- head/bin/ls/ls.h	Thu Nov  8 23:42:22 2012	(r242806)
+++ head/bin/ls/ls.h	Thu Nov  8 23:45:19 2012	(r242807)
@@ -49,14 +49,14 @@ extern int f_longform;		/* long listing 
 extern int f_octal;		/* print unprintables in octal */
 extern int f_octal_escape;	/* like f_octal but use C escapes if possible */
 extern int f_nonprint;		/* show unprintables as ? */
-extern int f_samesort;          /* sort time and name in same direction */
+extern int f_samesort;		/* sort time and name in same direction */
 extern int f_sectime;		/* print the real time for all files */
 extern int f_size;		/* list size in short listing */
 extern int f_slash;		/* append a '/' if the file is a directory */
 extern int f_sortacross;	/* sort across rows, not down columns */
 extern int f_statustime;	/* use time of last mode change */
 extern int f_thousands;		/* show file sizes with thousands separators */
-extern char *f_timeformat;      /* user-specified time format */
+extern char *f_timeformat;	/* user-specified time format */
 extern int f_notabs;		/* don't use tab-separated multi-col output */
 extern int f_type;		/* add type character for non-regular files */
 #ifdef COLORLS

Modified: head/bin/ls/print.c
==============================================================================
--- head/bin/ls/print.c	Thu Nov  8 23:42:22 2012	(r242806)
+++ head/bin/ls/print.c	Thu Nov  8 23:45:19 2012	(r242807)
@@ -160,7 +160,7 @@ printlong(const DISPLAY *dp)
 		strmode(sp->st_mode, buf);
 		aclmode(buf, p);
 		np = p->fts_pointer;
-		(void)printf("%s %*u %-*s  %-*s  ", buf, dp->s_nlink,
+		(void)printf("%s %*u %-*s  %-*s	 ", buf, dp->s_nlink,
 		    sp->st_nlink, dp->s_user, np->user, dp->s_group,
 		    np->group);
 		if (f_flags)
@@ -382,7 +382,7 @@ printtime(time_t ftime)
 		format = d_first ? "%e %b %R" : "%b %e %R";
 	else
 		/* mmm dd  yyyy || dd mmm  yyyy */
-		format = d_first ? "%e %b  %Y" : "%b %e  %Y";
+		format = d_first ? "%e %b  %Y" : "%b %e	 %Y";
 	strftime(longstring, sizeof(longstring), format, localtime(&ftime));
 	fputs(longstring, stdout);
 	fputc(' ', stdout);
@@ -606,11 +606,11 @@ printsize(size_t width, off_t bytes)
 		humanize_number(buf, sizeof(buf), (int64_t)bytes, "",
 		    HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL);
 		(void)printf("%*s ", (u_int)width, buf);
-	} else if (f_thousands) {               /* with commas */
+	} else if (f_thousands) {		/* with commas */
 		/* This format assignment needed to work round gcc bug. */
-                const char *format = "%*j'd ";
+		const char *format = "%*j'd ";
 		(void)printf(format, (u_int)width, bytes);
-        } else
+	} else
 		(void)printf("%*jd ", (u_int)width, bytes);
 }
 

Modified: head/bin/ls/util.c
==============================================================================
--- head/bin/ls/util.c	Thu Nov  8 23:42:22 2012	(r242806)
+++ head/bin/ls/util.c	Thu Nov  8 23:45:19 2012	(r242807)
@@ -132,7 +132,7 @@ prn_printable(const char *s)
  * to fix this as an efficient fix would involve a lookup table. Same goes
  * for the rather inelegant code in prn_octal.
  *
- *                                              DES 1998/04/23
+ *						DES 1998/04/23
  */
 
 size_t
@@ -200,9 +200,9 @@ prn_octal(const char *s)
 			for (i = 0; i < prtlen; i++) {
 				ch = (unsigned char)s[i];
 				putchar('\\');
-		                putchar('0' + (ch >> 6));
-		                putchar('0' + ((ch >> 3) & 7));
-		                putchar('0' + (ch & 7));
+				putchar('0' + (ch >> 6));
+				putchar('0' + ((ch >> 3) & 7));
+				putchar('0' + (ch & 7));
 				len += 4;
 			}
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211082345.qA8NjJaP049900>