run through indent

This commit is contained in:
Glenn L McGrath 2003-10-30 22:47:16 +00:00
parent 00ed36fd52
commit 09c295a5bc

View File

@ -65,8 +65,7 @@
This function have special algorithm.
Don`t use fork and include to main!
*/
static int
xargs_exec (char *const *args)
static int xargs_exec(char *const *args)
{
pid_t p;
volatile int exec_errno = 0; /* shared vfork stack */
@ -90,7 +89,8 @@ xargs_exec (char *const *args)
return exec_errno == ENOENT ? 127 : 126;
} else {
if (WEXITSTATUS(status) == 255) {
bb_error_msg ("%s: exited with status 255; aborting", args[0]);
bb_error_msg("%s: exited with status 255; aborting",
args[0]);
return 124;
}
if (WIFSTOPPED(status)) {
@ -127,8 +127,8 @@ static int eof_stdin_detected;
|| (c) == '\f' || (c) == '\v')
#ifdef CONFIG_FEATURE_XARGS_SUPPORT_QUOTES
static xlist_t *
process_stdin (xlist_t *list_arg, const char *eof_str, size_t mc, char *buf)
static xlist_t *process_stdin(xlist_t * list_arg, const char *eof_str,
size_t mc, char *buf)
{
#define NORM 0
#define QUOTE 1
@ -171,7 +171,8 @@ process_stdin (xlist_t *list_arg, const char *eof_str, size_t mc, char *buf)
} else {
goto set;
}
} else /* if(state == NORM) */ {
} else { /* if(state == NORM) */
if (ISSPACE(c)) {
if (s) {
unexpected_eof:
@ -230,8 +231,8 @@ set:
}
#else
/* The variant is unsupport single, double quotes and backslash */
static xlist_t *
process_stdin (xlist_t *list_arg, const char *eof_str, size_t mc, char *buf)
static xlist_t *process_stdin(xlist_t * list_arg, const char *eof_str,
size_t mc, char *buf)
{
int c; /* current char */
@ -301,8 +302,7 @@ process_stdin (xlist_t *list_arg, const char *eof_str, size_t mc, char *buf)
/* Prompt the user for a response, and
if the user responds affirmatively, return true;
otherwise, return false. Used "/dev/tty", not stdin. */
static int
xargs_ask_confirmation (void)
static int xargs_ask_confirmation(void)
{
static FILE *tty_stream;
int c, savec;
@ -323,6 +323,7 @@ xargs_ask_confirmation (void)
return 1;
return 0;
}
# define OPT_INC_P 1
#else
# define OPT_INC_P 0
@ -336,8 +337,8 @@ xargs_ask_confirmation (void)
#endif
#ifdef CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM
static xlist_t *
process0_stdin (xlist_t *list_arg, const char *eof_str, size_t mc, char *buf)
static xlist_t *process0_stdin(xlist_t * list_arg, const char *eof_str,
size_t mc, char *buf)
{
int c; /* current char */
char *s = NULL; /* start word */
@ -389,6 +390,7 @@ process0_stdin (xlist_t *list_arg, const char *eof_str, size_t mc, char *buf)
}
return list_arg;
}
# define READ_ARGS(l, e, nmc, mc) (*read_args)(l, e, nmc, mc)
# define OPT_INC_0 1 /* future use */
#else
@ -413,8 +415,7 @@ process0_stdin (xlist_t *list_arg, const char *eof_str, size_t mc, char *buf)
#define OPT_NEXT_OTHER (1<<(5+OPT_INC_P+OPT_INC_X+OPT_INC_0))
*/
int
xargs_main (int argc, char **argv)
int xargs_main(int argc, char **argv)
{
char **args;
int i, a, n;
@ -428,8 +429,10 @@ xargs_main (int argc, char **argv)
const char *eof_str = "_";
unsigned long opt;
size_t n_max_chars;
#ifdef CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM
xlist_t * (*read_args) (xlist_t *, const char *, size_t, char *) = process_stdin;
xlist_t *(*read_args) (xlist_t *, const char *, size_t, char *) =
process_stdin;
#endif
#ifdef CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION
@ -569,7 +572,9 @@ const char *bb_applet_name = "debug stuff usage";
void bb_show_usage(void)
{
fprintf(stderr, "Usage: %s [-p] [-r] [-t] -[x] [-n max_arg] [-s max_chars]\n", bb_applet_name);
fprintf(stderr,
"Usage: %s [-p] [-r] [-t] -[x] [-n max_arg] [-s max_chars]\n",
bb_applet_name);
exit(1);
}