diff options
author | joe <joe@FreeBSD.org> | 2001-12-28 21:47:33 +0000 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2001-12-28 21:47:33 +0000 |
commit | d2121ec1c3392b34fcbf8666789119e495f60d9b (patch) | |
tree | dce28e2aa43badda99727df8fcc3c8f057565fc8 /bin/ls | |
parent | f6dd852457c63475e76786932dc17687b97286d7 (diff) | |
download | FreeBSD-src-d2121ec1c3392b34fcbf8666789119e495f60d9b.zip FreeBSD-src-d2121ec1c3392b34fcbf8666789119e495f60d9b.tar.gz |
Revert most of rev 1.42, to restore KNF style.
Requested by: bde
Diffstat (limited to 'bin/ls')
-rw-r--r-- | bin/ls/print.c | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/bin/ls/print.c b/bin/ls/print.c index 74d30c5..0c40636 100644 --- a/bin/ls/print.c +++ b/bin/ls/print.c @@ -73,8 +73,8 @@ static void printtime __P((time_t)); static int printtype __P((u_int)); static void printsize __P((size_t, off_t)); #ifdef COLORLS -static void endcolor __P((int)); -static int colortype __P((mode_t)); +static void endcolor __P((int)); +static int colortype __P((mode_t)); #endif #define IS_NOPRINT(p) ((p)->fts_number == NO_PRINT) @@ -128,9 +128,9 @@ static struct { void printscol(dp) - DISPLAY *dp; + DISPLAY *dp; { - FTSENT *p; + FTSENT *p; for (p = dp->list; p; p = p->fts_link) { if (IS_NOPRINT(p)) @@ -160,11 +160,11 @@ printlong(dp) DISPLAY *dp; { struct stat *sp; - FTSENT *p; - NAMES *np; - char buf[20]; + FTSENT *p; + NAMES *np; + char buf[20]; #ifdef COLORLS - int color_printed = 0; + int color_printed = 0; #endif if (dp->list->fts_level != FTS_ROOTLEVEL && (f_longform || f_size)) @@ -226,23 +226,23 @@ printlong(dp) void printcol(dp) - DISPLAY *dp; + DISPLAY *dp; { extern int termwidth; static FTSENT **array; static int lastentries = -1; - FTSENT *p; - int base; - int chcnt; - int cnt; - int col; - int colwidth; - int endcol; - int num; - int numcols; - int numrows; - int row; - int tabwidth; + FTSENT *p; + int base; + int chcnt; + int cnt; + int col; + int colwidth; + int endcol; + int num; + int numcols; + int numrows; + int row; + int tabwidth; if (f_notabs) tabwidth = 1; @@ -310,14 +310,14 @@ printcol(dp) */ static int printaname(p, inodefield, sizefield) - FTSENT *p; - u_long inodefield; - u_long sizefield; + FTSENT *p; + u_long inodefield; + u_long sizefield; { struct stat *sp; - int chcnt; + int chcnt; #ifdef COLORLS - int color_printed = 0; + int color_printed = 0; #endif sp = p->fts_statp; @@ -343,12 +343,12 @@ printaname(p, inodefield, sizefield) static void printtime(ftime) - time_t ftime; + time_t ftime; { - char longstring[80]; - static time_t now; - const char *format; - static int d_first = -1; + char longstring[80]; + static time_t now; + const char *format; + static int d_first = -1; if (d_first < 0) d_first = (*nl_langinfo(D_MD_ORDER) == 'd'); @@ -371,7 +371,7 @@ printtime(ftime) static int printtype(mode) - u_int mode; + u_int mode; { switch (mode & S_IFMT) { case S_IFDIR: @@ -400,7 +400,7 @@ printtype(mode) #ifdef COLORLS static int putch(c) - int c; + int c; { (void) putchar(c); return 0; @@ -408,9 +408,9 @@ putch(c) static int writech(c) - int c; + int c; { - char tmp = c; + char tmp = c; (void) write(STDOUT_FILENO, &tmp, 1); return 0; @@ -418,9 +418,9 @@ writech(c) static void printcolor(c) - Colors c; + Colors c; { - char *ansiseq; + char *ansiseq; if (colors[c].bold) tputs(enter_bold, 1, putch); @@ -440,7 +440,7 @@ printcolor(c) static void endcolor(sig) - int sig; + int sig; { tputs(ansi_coloff, 1, sig ? writech : putch); tputs(attrs_off, 1, sig ? writech : putch); @@ -448,7 +448,7 @@ endcolor(sig) static int colortype(mode) - mode_t mode; + mode_t mode; { switch(mode & S_IFMT) { case S_IFDIR: @@ -492,11 +492,11 @@ void parsecolors(cs) const char *cs; { - int i; - int j; - int len; - char c[2]; - short legacy_warn = 0; + int i; + int j; + int len; + char c[2]; + short legacy_warn = 0; if (cs == NULL) cs = ""; /* LSCOLORS not set */ @@ -542,7 +542,7 @@ parsecolors(cs) void colorquit(sig) - int sig; + int sig; { endcolor(sig); @@ -553,11 +553,11 @@ colorquit(sig) static void printlink(p) - FTSENT *p; + FTSENT *p; { - int lnklen; - char name[MAXPATHLEN + 1]; - char path[MAXPATHLEN + 1]; + int lnklen; + char name[MAXPATHLEN + 1]; + char path[MAXPATHLEN + 1]; if (p->fts_level == FTS_ROOTLEVEL) (void)snprintf(name, sizeof(name), "%s", p->fts_name); |