hush: cosmetics. no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2009-10-19 13:13:06 +02:00
parent e8405619fa
commit c0836530f1

View File

@ -4184,7 +4184,7 @@ static void debug_print_tree(struct pipe *pi, int lvl)
pin++;
}
}
#endif
#endif /* debug_print_tree */
/* NB: called by pseudo_exec, and therefore must not modify any
* global data until exec/_exit (we can be a child after vfork!) */
@ -4793,7 +4793,7 @@ static int reserved_word(o_string *word, struct parse_context *ctx)
}
return 1;
}
#endif
#endif /* HAS_KEYWORDS */
/* Word is complete, look at it and update parsing context.
* Normal return is 0. Syntax errors return 1.
@ -5336,7 +5336,7 @@ static int process_command_subs(o_string *dest, const char *s)
debug_printf("closed FILE from child. return 0\n");
return 0;
}
#endif
#endif /* ENABLE_HUSH_TICK */
static int parse_group(o_string *dest, struct parse_context *ctx,
struct in_str *input, int ch)
@ -5704,7 +5704,7 @@ static int handle_dollar(o_string *as_string,
o_addchr(dest, SPECIAL_VAR_SYMBOL);
break;
}
#if (ENABLE_SH_MATH_SUPPORT || ENABLE_HUSH_TICK)
#if ENABLE_SH_MATH_SUPPORT || ENABLE_HUSH_TICK
case '(': {
# if !BB_MMU
int pos;
@ -6169,8 +6169,9 @@ static struct pipe *parse_stream(char **pstring,
/* Example: echo Hello \2>file
* we need to know that word 2 is quoted */
dest.o_quoted = 1;
} else {
}
#if !BB_MMU
else {
/* It's "\<newline>". Remove trailing '\' from ctx.as_string */
ctx.as_string.data[--ctx.as_string.length] = '\0';
#endif
@ -6914,30 +6915,30 @@ static int FAST_FUNC builtin_true(char **argv UNUSED_PARAM)
return 0;
}
static int FAST_FUNC _builtin_applet(char **argv, int (applet)(int argc, char **argv))
static int FAST_FUNC run_applet_main(char **argv, int (*applet_main)(int argc, char **argv))
{
int argc = 0;
while (*argv) {
argc++;
argv++;
}
return applet(argc, argv - argc);
return applet_main(argc, argv - argc);
}
static int FAST_FUNC builtin_test(char **argv)
{
return _builtin_applet(argv, test_main);
return run_applet_main(argv, test_main);
}
static int FAST_FUNC builtin_echo(char **argv)
{
return _builtin_applet(argv, echo_main);
return run_applet_main(argv, echo_main);
}
#if ENABLE_PRINTF
static int FAST_FUNC builtin_printf(char **argv)
{
return _builtin_applet(argv, printf_main);
return run_applet_main(argv, printf_main);
}
#endif