just whitespace

This commit is contained in:
Tim Riker
2006-01-25 00:08:53 +00:00
parent f64ff682a3
commit c1ef7bdd8d
254 changed files with 2002 additions and 2002 deletions

View File

@@ -457,8 +457,8 @@ config CONFIG_FEATURE_STAT_FORMAT
default n
depends on CONFIG_STAT
help
Without this, stat will not support the '-c format' option where
users can pass a custom format string for output. This adds about
Without this, stat will not support the '-c format' option where
users can pass a custom format string for output. This adds about
7k to a nonstatic build on amd64.
config CONFIG_STTY

View File

@@ -45,10 +45,10 @@
#endif
#define THURSDAY 4 /* for reformation */
#define SATURDAY 6 /* 1 Jan 1 was a Saturday */
#define SATURDAY 6 /* 1 Jan 1 was a Saturday */
#define FIRST_MISSING_DAY 639787 /* 3 Sep 1752 */
#define NUMBER_MISSING_DAYS 11 /* 11 day correction */
#define FIRST_MISSING_DAY 639787 /* 3 Sep 1752 */
#define NUMBER_MISSING_DAYS 11 /* 11 day correction */
#define MAXDAYS 42 /* max slots in a month array */
#define SPACE -1 /* used in day array */

View File

@@ -91,23 +91,23 @@ static struct tm *date_conv_ftime(struct tm *tm_time, const char *t_string)
&t.tm_min) == 2) {
/* no adjustments needed */
} else if (t = *tm_time, sscanf(t_string, "%d.%d-%d:%d:%d", &t.tm_mon,
&t.tm_mday, &t.tm_hour,
&t.tm_mday, &t.tm_hour,
&t.tm_min, &t.tm_sec) == 5) {
/* Adjust dates from 1-12 to 0-11 */
t.tm_mon -= 1;
} else if (t = *tm_time, sscanf(t_string, "%d.%d-%d:%d", &t.tm_mon,
&t.tm_mday,
&t.tm_mday,
&t.tm_hour, &t.tm_min) == 4) {
/* Adjust dates from 1-12 to 0-11 */
t.tm_mon -= 1;
} else if (t = *tm_time, sscanf(t_string, "%d.%d.%d-%d:%d:%d", &t.tm_year,
&t.tm_mon, &t.tm_mday,
&t.tm_mon, &t.tm_mday,
&t.tm_hour, &t.tm_min,
&t.tm_sec) == 6) {
t.tm_year -= 1900; /* Adjust years */
t.tm_mon -= 1; /* Adjust dates from 1-12 to 0-11 */
} else if (t = *tm_time, sscanf(t_string, "%d.%d.%d-%d:%d", &t.tm_year,
&t.tm_mon, &t.tm_mday,
&t.tm_mon, &t.tm_mday,
&t.tm_hour, &t.tm_min) == 5) {
t.tm_year -= 1900; /* Adjust years */
t.tm_mon -= 1; /* Adjust dates from 1-12 to 0-11 */
@@ -119,9 +119,9 @@ static struct tm *date_conv_ftime(struct tm *tm_time, const char *t_string)
}
#define DATE_OPT_RFC2822 0x01
#define DATE_OPT_SET 0x02
#define DATE_OPT_UTC 0x04
#define DATE_OPT_DATE 0x08
#define DATE_OPT_SET 0x02
#define DATE_OPT_UTC 0x04
#define DATE_OPT_DATE 0x08
#define DATE_OPT_REFERENCE 0x10
#ifdef CONFIG_FEATURE_DATE_ISOFMT
# define DATE_OPT_TIMESPEC 0x20

View File

@@ -365,7 +365,7 @@ static VALUE *eval6 (void)
else {
v = xmalloc (sizeof(VALUE));
v->type = string;
v->u.s = bb_xstrndup(l->u.s + i1->u.i - 1, i2->u.i);
v->u.s = bb_xstrndup(l->u.s + i1->u.i - 1, i2->u.i);
}
freev (l);
freev (i1);

View File

@@ -44,7 +44,7 @@ static const struct option install_long_options[] = {
{ "preserve-timestamps", 0, NULL, 'p' },
{ "strip", 0, NULL, 's' },
{ "group", 0, NULL, 'g' },
{ "mode", 0, NULL, 'm' },
{ "mode", 0, NULL, 'm' },
{ "owner", 0, NULL, 'o' },
{ 0, 0, 0, 0 }
};

View File

@@ -33,7 +33,7 @@ extern mode_t getopt_mk_fifo_nod(int argc, char **argv)
bb_getopt_ulflags(argc, argv, "m:", &smode);
if(smode) {
if (bb_parse_mode(smode, &mode))
if (bb_parse_mode(smode, &mode))
umask(0);
}
return mode;

View File

@@ -173,7 +173,7 @@ static int show_color = 0;
static const struct option ls_color_opt[] =
{
{"color", optional_argument, NULL, 1},
{NULL, 0, NULL, 0}
{NULL, 0, NULL, 0}
};
#define COLOR(mode) ("\000\043\043\043\042\000\043\043"\
@@ -318,7 +318,7 @@ static int count_dirs(struct dnode **dn, int nfiles, int notsubdirs)
dirs = 0;
for (i = 0; i < nfiles; i++) {
if (S_ISDIR(dn[i]->dstat.st_mode)
&& (notsubdirs ||
&& (notsubdirs ||
((dn[i]->name[0] != '.') || (dn[i]->name[1]
&& ((dn[i]->name[1] != '.')
|| dn[i]->name[2])))))
@@ -747,7 +747,7 @@ static int list_single(struct dnode *dn)
{
char context[80];
int len;
if (dn->sid) {
/* I assume sid initilized with NULL */
len = strlen(dn->sid)+1;
@@ -895,57 +895,57 @@ static const char ls_options[]="Cadil1gnsxAk" \
static const unsigned opt_flags[] = {
LIST_SHORT | STYLE_COLUMNS, /* C */
DISP_HIDDEN | DISP_DOT, /* a */
DISP_NOLIST, /* d */
LIST_INO, /* i */
LIST_LONG | STYLE_LONG, /* l - remember LS_DISP_HR in mask! */
LIST_SHORT | STYLE_SINGLE, /* 1 */
0, /* g - ingored */
LIST_ID_NUMERIC, /* n */
LIST_BLOCKS, /* s */
DISP_ROWS, /* x */
DISP_HIDDEN, /* A */
DISP_HIDDEN | DISP_DOT, /* a */
DISP_NOLIST, /* d */
LIST_INO, /* i */
LIST_LONG | STYLE_LONG, /* l - remember LS_DISP_HR in mask! */
LIST_SHORT | STYLE_SINGLE, /* 1 */
0, /* g - ingored */
LIST_ID_NUMERIC, /* n */
LIST_BLOCKS, /* s */
DISP_ROWS, /* x */
DISP_HIDDEN, /* A */
#ifdef CONFIG_SELINUX
LIST_CONTEXT, /* k */
LIST_CONTEXT, /* k */
#else
0, /* k - ingored */
0, /* k - ingored */
#endif
#ifdef CONFIG_FEATURE_LS_TIMESTAMPS
# ifdef CONFIG_FEATURE_LS_SORTFILES
TIME_CHANGE | SORT_CTIME, /* c */
# else
TIME_CHANGE, /* c */
TIME_CHANGE, /* c */
# endif
LIST_FULLTIME, /* e */
LIST_FULLTIME, /* e */
# ifdef CONFIG_FEATURE_LS_SORTFILES
SORT_MTIME, /* t */
SORT_MTIME, /* t */
# else
0, /* t - ignored -- is this correct? */
0, /* t - ignored -- is this correct? */
# endif
# ifdef CONFIG_FEATURE_LS_SORTFILES
TIME_ACCESS | SORT_ATIME, /* u */
# else
TIME_ACCESS, /* u */
TIME_ACCESS, /* u */
# endif
#endif
#ifdef CONFIG_FEATURE_LS_SORTFILES
SORT_SIZE, /* S */
SORT_EXT, /* X */
SORT_ORDER_REVERSE, /* r */
SORT_VERSION, /* v */
SORT_SIZE, /* S */
SORT_EXT, /* X */
SORT_ORDER_REVERSE, /* r */
SORT_VERSION, /* v */
#endif
#ifdef CONFIG_FEATURE_LS_FILETYPES
LIST_FILETYPE | LIST_EXEC, /* F */
LIST_FILETYPE, /* p */
LIST_FILETYPE, /* p */
#endif
#ifdef CONFIG_FEATURE_LS_FOLLOWLINKS
FOLLOW_LINKS, /* L */
FOLLOW_LINKS, /* L */
#endif
#ifdef CONFIG_FEATURE_LS_RECURSIVE
DISP_RECURSIVE, /* R */
DISP_RECURSIVE, /* R */
#endif
#ifdef CONFIG_FEATURE_HUMAN_READABLE
LS_DISP_HR, /* h */
LS_DISP_HR, /* h */
#endif
#ifdef CONFIG_SELINUX
LIST_MODEBITS|LIST_NLINKS|LIST_CONTEXT|LIST_SIZE|LIST_DATE_TIME, /* K */
@@ -1025,7 +1025,7 @@ extern int ls_main(int argc, char **argv)
for (i = 0; opt_flags[i] != (1U<<31); i++) {
if (opt & (1 << i)) {
unsigned int flags = opt_flags[i];
if (flags & LIST_MASK_TRIGGER) {
all_fmt &= ~LIST_MASK;
}
@@ -1064,11 +1064,11 @@ extern int ls_main(int argc, char **argv)
#if CONFIG_FEATURE_LS_COLOR_IS_DEFAULT
char *p;
if ((p = getenv ("LS_COLORS")) != NULL &&
if ((p = getenv ("LS_COLORS")) != NULL &&
(*p == '\0' || (strcmp(p, "none") == 0))) {
;
} else if (isatty(STDOUT_FILENO)) {
show_color = 1;
show_color = 1;
}
#endif

View File

@@ -77,7 +77,7 @@ int nice_main(int argc, char **argv)
bb_perror_msg_and_die(Xetpriority_msg, 's');
}
}
execvp(*argv, argv); /* Now exec the desired program. */
/* The exec failed... */

View File

@@ -63,12 +63,12 @@ void multiconvert(char *arg, void *result, converter convert)
}
if(convert(arg,result)) fprintf(stderr, "%s", arg);
}
static unsigned long xstrtoul(char *arg)
{
unsigned long result;
multiconvert(arg,&result, (converter)safe_strtoul);
multiconvert(arg,&result, (converter)safe_strtoul);
return result;
}

View File

@@ -59,7 +59,7 @@ extern int rmdir_main(int argc, char **argv)
/* Path is now just the parent component. Note that dirname
* returns "." if there are no parents. We must distinguish
* this from the case of the original path starting with '.'.
*/
*/
if (do_dot || (*path != '.') || path[1]) {
continue;
}

View File

@@ -156,7 +156,7 @@ static int compare_keys(const void *xarg, const void *yarg)
#ifdef CONFIG_FEATURE_SORT_BIG
struct sort_key *key;
for(key=key_list;!retval && key;key=key->next_key) {
flags=(key->flags) ? key->flags : global_flags;
/* Chop out and modify key chunks, handling -dfib */
@@ -312,7 +312,7 @@ int sort_main(int argc, char **argv)
#ifdef CONFIG_FEATURE_SORT_BIG
/* if no key, perform alphabetic sort */
if(!key_list) add_key()->range[0]=1;
/* handle -c */
/* handle -c */
if(global_flags&FLAG_c) {
int j=(global_flags&FLAG_u) ? -1 : 0;
for(i=1;i<linecount;i++)

View File

@@ -44,9 +44,9 @@ static long flags;
static char const *file_type(struct stat const *st)
{
/* See POSIX 1003.1-2001 XCU Table 4-8 lines 17093-17107
/* See POSIX 1003.1-2001 XCU Table 4-8 lines 17093-17107
* for some of these formats.
* To keep diagnostics grammatical in English, the
* To keep diagnostics grammatical in English, the
* returned string must start with a consonant.
*/
if (S_ISREG(st->st_mode)) return st->st_size == 0 ? "regular empty file" : "regular file";
@@ -131,8 +131,8 @@ static char const *human_fstype(long f_type)
#ifdef CONFIG_FEATURE_STAT_FORMAT
/* print statfs info */
static void print_statfs(char *pformat, size_t buf_len, char m,
char const *filename, void const *data)
static void print_statfs(char *pformat, size_t buf_len, char m,
char const *filename, void const *data)
{
struct statfs const *statfsbuf = data;
@@ -190,8 +190,8 @@ static void print_statfs(char *pformat, size_t buf_len, char m,
}
/* print stat info */
static void print_stat(char *pformat, size_t buf_len, char m,
char const *filename, void const *data)
static void print_stat(char *pformat, size_t buf_len, char m,
char const *filename, void const *data)
{
#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
struct stat *statbuf = (struct stat *) data;
@@ -326,9 +326,9 @@ static void print_stat(char *pformat, size_t buf_len, char m,
}
}
static void print_it(char const *masterformat, char const *filename,
void (*print_func) (char *, size_t, char, char const *, void const *),
void const *data)
static void print_it(char const *masterformat, char const *filename,
void (*print_func) (char *, size_t, char, char const *, void const *),
void const *data)
{
char *b;

View File

@@ -4,14 +4,14 @@
*
* Copyright (c) by a whole pile of folks:
*
* test(1); version 7-like -- author Erik Baalbergen
* modified by Eric Gisin to be used as built-in.
* modified by Arnold Robbins to add SVR3 compatibility
* (-x -c -b -p -u -g -k) plus Korn's -L -nt -ot -ef and new -S (socket).
* modified by J.T. Conklin for NetBSD.
* modified by Herbert Xu to be used as built-in in ash.
* modified by Erik Andersen <andersen@codepoet.org> to be used
* in busybox.
* test(1); version 7-like -- author Erik Baalbergen
* modified by Eric Gisin to be used as built-in.
* modified by Arnold Robbins to add SVR3 compatibility
* (-x -c -b -p -u -g -k) plus Korn's -L -nt -ot -ef and new -S (socket).
* modified by J.T. Conklin for NetBSD.
* modified by Herbert Xu to be used as built-in in ash.
* modified by Erik Andersen <andersen@codepoet.org> to be used
* in busybox.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Original copyright notice states:
* "This program is in the Public Domain."
* "This program is in the Public Domain."
*/
#include <sys/types.h>

View File

@@ -93,7 +93,7 @@ int uname_main(int argc, char **argv)
}
#if defined(__sparc__) && defined(__linux__)
if ((fake_sparc != NULL)
if ((fake_sparc != NULL)
&& ((fake_sparc[0] == 'y')
|| (fake_sparc[0] == 'Y'))) {
strcpy(uname_info.name.machine, "sparc");

View File

@@ -56,7 +56,7 @@ static int read_stduu(FILE *src_stream, FILE *dst_stream)
bb_error_msg_and_die("Short file");
}
while (length > 0) {
while (length > 0) {
/* Merge four 6 bit chars to three 8 bit chars */
fputc(((line_ptr[0] - 0x20) & 077) << 2 | ((line_ptr[1] - 0x20) & 077) >> 4, dst_stream);
line_ptr++;
@@ -65,14 +65,14 @@ static int read_stduu(FILE *src_stream, FILE *dst_stream)
break;
}
fputc(((line_ptr[0] - 0x20) & 077) << 4 | ((line_ptr[1] - 0x20) & 077) >> 2, dst_stream);
fputc(((line_ptr[0] - 0x20) & 077) << 4 | ((line_ptr[1] - 0x20) & 077) >> 2, dst_stream);
line_ptr++;
length--;
if (length == 0) {
break;
}
fputc(((line_ptr[0] - 0x20) & 077) << 6 | ((line_ptr[1] - 0x20) & 077), dst_stream);
fputc(((line_ptr[0] - 0x20) & 077) << 6 | ((line_ptr[1] - 0x20) & 077), dst_stream);
line_ptr += 2;
length -= 2;
}
@@ -130,10 +130,10 @@ static int read_base64(FILE *src_stream, FILE *dst_stream)
/* Merge 6 bit chars to 8 bit */
fputc(translated[0] << 2 | translated[1] >> 4, dst_stream);
if (count > 2) {
fputc(translated[1] << 4 | translated[2] >> 2, dst_stream);
fputc(translated[1] << 4 | translated[2] >> 2, dst_stream);
}
if (count > 3) {
fputc(translated[2] << 6 | translated[3], dst_stream);
fputc(translated[2] << 6 | translated[3], dst_stream);
}
}
}

View File

@@ -33,49 +33,49 @@ extern int who_main(int argc, char **argv)
time_t now, idle;
if (argc > 1)
bb_show_usage();
bb_show_usage();
setutent();
devlen = sizeof("/dev/") - 1;
printf("USER TTY IDLE FROM HOST\n");
while ((ut = getutent()) != NULL) {
char name[40];
char name[40];
if (ut->ut_user[0] && ut->ut_type == USER_PROCESS) {
len = strlen(ut->ut_line);
if (ut->ut_line[0] == '/') {
strncpy(name, ut->ut_line, len);
name[len] = '\0';
strcpy(ut->ut_line, ut->ut_line + devlen);
} else {
strcpy(name, "/dev/");
strncpy(name+devlen, ut->ut_line, len);
name[devlen+len] = '\0';
}
if (ut->ut_user[0] && ut->ut_type == USER_PROCESS) {
len = strlen(ut->ut_line);
if (ut->ut_line[0] == '/') {
strncpy(name, ut->ut_line, len);
name[len] = '\0';
strcpy(ut->ut_line, ut->ut_line + devlen);
} else {
strcpy(name, "/dev/");
strncpy(name+devlen, ut->ut_line, len);
name[devlen+len] = '\0';
}
printf("%-10s %-8s ", ut->ut_user, ut->ut_line);
printf("%-10s %-8s ", ut->ut_user, ut->ut_line);
if (stat(name, &st) == 0) {
now = time(NULL);
idle = now - st.st_atime;
if (stat(name, &st) == 0) {
now = time(NULL);
idle = now - st.st_atime;
if (idle < 60)
printf("00:00m ");
else if (idle < (60 * 60))
printf("00:%02dm ", (int)(idle / 60));
else if (idle < (24 * 60 * 60))
printf("%02d:%02dm ", (int)(idle / (60 * 60)),
(int)(idle % (60 * 60)) / 60);
else if (idle < (24 * 60 * 60 * 365))
printf("%03ddays ", (int)(idle / (24 * 60 * 60)));
else
printf("%02dyears ", (int) (idle / (24 * 60 * 60 * 365)));
} else
printf("%-8s ", "?");
if (idle < 60)
printf("00:00m ");
else if (idle < (60 * 60))
printf("00:%02dm ", (int)(idle / 60));
else if (idle < (24 * 60 * 60))
printf("%02d:%02dm ", (int)(idle / (60 * 60)),
(int)(idle % (60 * 60)) / 60);
else if (idle < (24 * 60 * 60 * 365))
printf("%03ddays ", (int)(idle / (24 * 60 * 60)));
else
printf("%02dyears ", (int) (idle / (24 * 60 * 60 * 365)));
} else
printf("%-8s ", "?");
printf("%-12.12s %s\n", ctime((time_t*)&(ut->ut_tv.tv_sec)) + 4, ut->ut_host);
}
printf("%-12.12s %s\n", ctime((time_t*)&(ut->ut_tv.tv_sec)) + 4, ut->ut_host);
}
}
endutent();