whitespace cleanup

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
This commit is contained in:
Denys Vlasenko
2010-10-29 11:46:52 +02:00
parent 66cb7bed33
commit fb132e4737
69 changed files with 231 additions and 268 deletions

View File

@@ -278,7 +278,7 @@ int date_main(int argc UNUSED_PARAM, char **argv)
}
/* Correct any day of week and day of year etc. fields */
tm_time.tm_isdst = -1; /* Be sure to recheck dst */
tm_time.tm_isdst = -1; /* Be sure to recheck dst */
ts.tv_sec = validate_tm_time(date_str, &tm_time);
maybe_set_utc(opt);

View File

@@ -24,7 +24,7 @@ static const struct suffix_mult dd_suffixes[] = {
{ "b", 512 },
{ "kD", 1000 },
{ "k", 1024 },
{ "K", 1024 }, /* compat with coreutils dd */
{ "K", 1024 }, /* compat with coreutils dd */
{ "MD", 1000000 },
{ "M", 1048576 },
{ "GD", 1000000000 },

View File

@@ -92,7 +92,7 @@ int mv_main(int argc, char **argv)
|| (flags & OPT_FILEUTILS_INTERACTIVE))
) {
if (fprintf(stderr, "mv: overwrite '%s'? ", dest) < 0) {
goto RET_1; /* Ouch! fprintf failed! */
goto RET_1; /* Ouch! fprintf failed! */
}
if (!bb_ask_confirmation()) {
goto RET_0;

View File

@@ -17,12 +17,12 @@ int nice_main(int argc, char **argv)
old_priority = getpriority(PRIO_PROCESS, 0);
if (!*++argv) { /* No args, so (GNU) output current nice value. */
if (!*++argv) { /* No args, so (GNU) output current nice value. */
printf("%d\n", old_priority);
fflush_stdout_and_exit(EXIT_SUCCESS);
}
adjustment = 10; /* Set default adjustment. */
adjustment = 10; /* Set default adjustment. */
if (argv[0][0] == '-') {
if (argv[0][1] == 'n') { /* -n */
@@ -32,7 +32,7 @@ int nice_main(int argc, char **argv)
} else { /* -NNN (NNN may be negative) == -n NNN */
argv[0] += 1; argv--; argc++;
}
if (argc < 4) { /* Missing priority and/or utility! */
if (argc < 4) { /* Missing priority and/or utility! */
bb_show_usage();
}
adjustment = xatoi_range(argv[1], INT_MIN/2, INT_MAX/2);

View File

@@ -4,7 +4,7 @@
* Based on code from util-linux v 2.11l
*
* Copyright (c) 1990
* The Regents of the University of California. All rights reserved.
* The Regents of the University of California. All rights reserved.
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*
@@ -174,7 +174,7 @@ int od_main(int argc, char **argv)
bb_dump_add(dumper, "\" \"");
}
bb_dump_add(dumper, add_strings[(int)od_o2si[(p - od_opts)]]);
} else { /* P, p, s, w, or other unhandled */
} else { /* P, p, s, w, or other unhandled */
bb_show_usage();
}
}

View File

@@ -52,8 +52,8 @@ enum {
static char key_separator;
static struct sort_key {
struct sort_key *next_key; /* linked list */
unsigned range[4]; /* start word, start char, end word, end char */
struct sort_key *next_key; /* linked list */
unsigned range[4]; /* start word, start char, end word, end char */
unsigned flags;
} *key_list;

View File

@@ -49,9 +49,9 @@
* state. */
/* test(1) accepts the following grammar:
oexpr ::= aexpr | aexpr "-o" oexpr ;
aexpr ::= nexpr | nexpr "-a" aexpr ;
nexpr ::= primary | "!" primary
oexpr ::= aexpr | aexpr "-o" oexpr ;
aexpr ::= nexpr | nexpr "-a" aexpr ;
nexpr ::= primary | "!" primary
primary ::= unary-operator operand
| operand binary-operator operand
| operand

View File

@@ -203,7 +203,7 @@ static unsigned expand(const char *arg, char **buffer_p)
buffer[pos++] = *arg; /* copy CHAR */
if (!arg[0] || arg[1] != '=' || arg[2] != ']')
bb_show_usage();
arg += 3; /* skip CHAR=] */
arg += 3; /* skip CHAR=] */
continue;
}
/* The rest of "[xyz..." cases is treated as normal
@@ -258,9 +258,9 @@ int tr_main(int argc UNUSED_PARAM, char **argv)
char *invec = vector + ASCII;
char *outvec = vector + ASCII * 2;
#define TR_OPT_complement (3 << 0)
#define TR_OPT_delete (1 << 2)
#define TR_OPT_squeeze_reps (1 << 3)
#define TR_OPT_complement (3 << 0)
#define TR_OPT_delete (1 << 2)
#define TR_OPT_squeeze_reps (1 << 3)
for (i = 0; i < ASCII; i++) {
vector[i] = i;

View File

@@ -153,7 +153,7 @@ int wc_main(int argc UNUSED_PARAM, char **argv)
bb_simple_perror_msg(arg);
status = EXIT_FAILURE;
}
goto DO_EOF; /* Treat an EOF as '\r'. */
goto DO_EOF; /* Treat an EOF as '\r'. */
}
/* Cater for -c and -m */
@@ -179,7 +179,7 @@ int wc_main(int argc UNUSED_PARAM, char **argv)
*/
if (c == '\t') {
linepos = (linepos | 7) + 1;
} else { /* '\n', '\r', '\f', or '\v' */
} else { /* '\n', '\r', '\f', or '\v' */
DO_EOF:
if (linepos > counts[WC_LENGTH]) {
counts[WC_LENGTH] = linepos;
@@ -230,7 +230,7 @@ int wc_main(int argc UNUSED_PARAM, char **argv)
* effect of trashing the totals array after outputting it, but that's
* irrelavent since we no longer need it. */
if (num_files > 1) {
num_files = 0; /* Make sure we don't get here again. */
num_files = 0; /* Make sure we don't get here again. */
arg = "total";
pcounts = totals;
--argv;