From dfd91f79a34a3e1b51fa5ec7233fb9c99efd69bf Mon Sep 17 00:00:00 2001 From: Greg Lehey Date: Thu, 8 Nov 2012 23:45:19 +0000 Subject: [PATCH] Replace spaces with tabs where appropriate. Reminded by: jh@ --- bin/ls/cmp.c | 16 ++++++++-------- bin/ls/extern.h | 12 ++++++------ bin/ls/ls.c | 22 +++++++++++----------- bin/ls/ls.h | 4 ++-- bin/ls/print.c | 10 +++++----- bin/ls/util.c | 8 ++++---- 6 files changed, 36 insertions(+), 36 deletions(-) diff --git a/bin/ls/cmp.c b/bin/ls/cmp.c index 872966611766..a2e46ff24204 100644 --- a/bin/ls/cmp.c +++ b/bin/ls/cmp.c @@ -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 *b) 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)); } diff --git a/bin/ls/extern.h b/bin/ls/extern.h index f290fbbe7e05..90a20a828863 100644 --- a/bin/ls/extern.h +++ b/bin/ls/extern.h @@ -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; diff --git a/bin/ls/ls.c b/bin/ls/ls.c index 36b0669cc304..8d0455e47f90 100644 --- a/bin/ls/ls.c +++ b/bin/ls/ls.c @@ -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 options) /* * 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 diff --git a/bin/ls/ls.h b/bin/ls/ls.h index 9a57de3e055c..1a45eb4b04a8 100644 --- a/bin/ls/ls.h +++ b/bin/ls/ls.h @@ -49,14 +49,14 @@ extern int f_longform; /* long listing format */ 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 diff --git a/bin/ls/print.c b/bin/ls/print.c index 335d0e9d9011..89faf6c64917 100644 --- a/bin/ls/print.c +++ b/bin/ls/print.c @@ -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); } diff --git a/bin/ls/util.c b/bin/ls/util.c index 7fa6606abd5e..a50eca4fbb7f 100644 --- a/bin/ls/util.c +++ b/bin/ls/util.c @@ -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; } }