summaryrefslogtreecommitdiffhomepage
path: root/shell/hush.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush.c')
-rw-r--r--shell/hush.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 2c88238ae..7e274324e 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -854,7 +854,7 @@ static int static_peek(struct in_str *i)
static void cmdedit_set_initial_prompt(void)
{
-#ifndef CONFIG_FEATURE_SH_FANCY_PROMPT
+#if !ENABLE_FEATURE_EDITING_FANCY_PROMPT
PS1 = NULL;
#else
PS1 = getenv("PS1");
@@ -866,7 +866,7 @@ static void cmdedit_set_initial_prompt(void)
static void setup_prompt_string(int promptmode, char **prompt_str)
{
debug_printf("setup_prompt_string %d ",promptmode);
-#ifndef CONFIG_FEATURE_SH_FANCY_PROMPT
+#if !ENABLE_FEATURE_EDITING_FANCY_PROMPT
/* Set up the prompt */
if (promptmode == 1) {
free(PS1);
@@ -882,7 +882,7 @@ static void setup_prompt_string(int promptmode, char **prompt_str)
debug_printf("result %s\n",*prompt_str);
}
-#if ENABLE_FEATURE_COMMAND_EDITING
+#if ENABLE_FEATURE_EDITING
static line_input_t *line_input_state;
#endif
@@ -892,7 +892,7 @@ static void get_user_input(struct in_str *i)
static char the_command[BUFSIZ];
setup_prompt_string(i->promptmode, &prompt_str);
-#if ENABLE_FEATURE_COMMAND_EDITING
+#if ENABLE_FEATURE_EDITING
/*
** enable command line editing only while a command line
** is actually being read; otherwise, we'll end up bequeathing
@@ -1109,7 +1109,7 @@ static void pseudo_exec(struct child_prog *child)
* really dislike relying on /proc for things. We could exec ourself
* from global_argv[0], but if we are in a chroot, we may not be able
* to find ourself... */
-#ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL
+#if ENABLE_FEATURE_SH_STANDALONE_SHELL
{
int argc_l;
char** argv_l=child->argv;
@@ -2650,7 +2650,7 @@ int hush_main(int argc, char **argv)
FILE *input;
char **e = environ;
-#ifdef CONFIG_FEATURE_COMMAND_EDITING
+#if ENABLE_FEATURE_EDITING
line_input_state = new_line_input_t(FOR_SHELL);
#endif
@@ -2672,7 +2672,8 @@ int hush_main(int argc, char **argv)
/* Initialize some more globals to non-zero values */
set_cwd();
- if (ENABLE_FEATURE_COMMAND_EDITING) cmdedit_set_initial_prompt();
+ if (ENABLE_FEATURE_EDITING)
+ cmdedit_set_initial_prompt();
else PS1 = NULL;
PS2 = "> ";
@@ -2738,7 +2739,7 @@ int hush_main(int argc, char **argv)
debug_printf("\ninteractive=%d\n", interactive);
if (interactive) {
/* Looks like they want an interactive shell */
-#ifndef CONFIG_FEATURE_SH_EXTRA_QUIET
+#if !ENABLE_FEATURE_SH_EXTRA_QUIET
printf( "\n\n%s hush - the humble shell v0.01 (testing)\n",
BB_BANNER);
printf( "Enter 'help' for a list of built-in commands.\n\n");
@@ -2757,7 +2758,7 @@ int hush_main(int argc, char **argv)
input = xfopen(argv[optind], "r");
opt = parse_file_outer(input);
-#ifdef CONFIG_FEATURE_CLEAN_UP
+#if ENABLE_FEATURE_CLEAN_UP
fclose(input);
if (cwd && cwd != bb_msg_unknown)
free((char*)cwd);