diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-01-22 09:03:07 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-01-22 09:03:07 +0000 |
commit | 38f6319421c1892ea5c9c0484cec0e190bdc5c69 (patch) | |
tree | 99a63bee4f133df98eb870308c4ca75e8dcbd8c1 /shell/hush.c | |
parent | 253ce0029669919fbb7cf60b5c9eab2f791939d8 (diff) | |
download | busybox-w32-38f6319421c1892ea5c9c0484cec0e190bdc5c69.tar.gz busybox-w32-38f6319421c1892ea5c9c0484cec0e190bdc5c69.tar.bz2 busybox-w32-38f6319421c1892ea5c9c0484cec0e190bdc5c69.zip |
cmdedit is not a 'command' editing anymore, it's just editing (generic),
so rename stuff accordingly.
Diffstat (limited to 'shell/hush.c')
-rw-r--r-- | shell/hush.c | 19 |
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) | |||
854 | 854 | ||
855 | static void cmdedit_set_initial_prompt(void) | 855 | static void cmdedit_set_initial_prompt(void) |
856 | { | 856 | { |
857 | #ifndef CONFIG_FEATURE_SH_FANCY_PROMPT | 857 | #if !ENABLE_FEATURE_EDITING_FANCY_PROMPT |
858 | PS1 = NULL; | 858 | PS1 = NULL; |
859 | #else | 859 | #else |
860 | PS1 = getenv("PS1"); | 860 | PS1 = getenv("PS1"); |
@@ -866,7 +866,7 @@ static void cmdedit_set_initial_prompt(void) | |||
866 | static void setup_prompt_string(int promptmode, char **prompt_str) | 866 | static void setup_prompt_string(int promptmode, char **prompt_str) |
867 | { | 867 | { |
868 | debug_printf("setup_prompt_string %d ",promptmode); | 868 | debug_printf("setup_prompt_string %d ",promptmode); |
869 | #ifndef CONFIG_FEATURE_SH_FANCY_PROMPT | 869 | #if !ENABLE_FEATURE_EDITING_FANCY_PROMPT |
870 | /* Set up the prompt */ | 870 | /* Set up the prompt */ |
871 | if (promptmode == 1) { | 871 | if (promptmode == 1) { |
872 | free(PS1); | 872 | free(PS1); |
@@ -882,7 +882,7 @@ static void setup_prompt_string(int promptmode, char **prompt_str) | |||
882 | debug_printf("result %s\n",*prompt_str); | 882 | debug_printf("result %s\n",*prompt_str); |
883 | } | 883 | } |
884 | 884 | ||
885 | #if ENABLE_FEATURE_COMMAND_EDITING | 885 | #if ENABLE_FEATURE_EDITING |
886 | static line_input_t *line_input_state; | 886 | static line_input_t *line_input_state; |
887 | #endif | 887 | #endif |
888 | 888 | ||
@@ -892,7 +892,7 @@ static void get_user_input(struct in_str *i) | |||
892 | static char the_command[BUFSIZ]; | 892 | static char the_command[BUFSIZ]; |
893 | 893 | ||
894 | setup_prompt_string(i->promptmode, &prompt_str); | 894 | setup_prompt_string(i->promptmode, &prompt_str); |
895 | #if ENABLE_FEATURE_COMMAND_EDITING | 895 | #if ENABLE_FEATURE_EDITING |
896 | /* | 896 | /* |
897 | ** enable command line editing only while a command line | 897 | ** enable command line editing only while a command line |
898 | ** is actually being read; otherwise, we'll end up bequeathing | 898 | ** is actually being read; otherwise, we'll end up bequeathing |
@@ -1109,7 +1109,7 @@ static void pseudo_exec(struct child_prog *child) | |||
1109 | * really dislike relying on /proc for things. We could exec ourself | 1109 | * really dislike relying on /proc for things. We could exec ourself |
1110 | * from global_argv[0], but if we are in a chroot, we may not be able | 1110 | * from global_argv[0], but if we are in a chroot, we may not be able |
1111 | * to find ourself... */ | 1111 | * to find ourself... */ |
1112 | #ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL | 1112 | #if ENABLE_FEATURE_SH_STANDALONE_SHELL |
1113 | { | 1113 | { |
1114 | int argc_l; | 1114 | int argc_l; |
1115 | char** argv_l=child->argv; | 1115 | char** argv_l=child->argv; |
@@ -2650,7 +2650,7 @@ int hush_main(int argc, char **argv) | |||
2650 | FILE *input; | 2650 | FILE *input; |
2651 | char **e = environ; | 2651 | char **e = environ; |
2652 | 2652 | ||
2653 | #ifdef CONFIG_FEATURE_COMMAND_EDITING | 2653 | #if ENABLE_FEATURE_EDITING |
2654 | line_input_state = new_line_input_t(FOR_SHELL); | 2654 | line_input_state = new_line_input_t(FOR_SHELL); |
2655 | #endif | 2655 | #endif |
2656 | 2656 | ||
@@ -2672,7 +2672,8 @@ int hush_main(int argc, char **argv) | |||
2672 | 2672 | ||
2673 | /* Initialize some more globals to non-zero values */ | 2673 | /* Initialize some more globals to non-zero values */ |
2674 | set_cwd(); | 2674 | set_cwd(); |
2675 | if (ENABLE_FEATURE_COMMAND_EDITING) cmdedit_set_initial_prompt(); | 2675 | if (ENABLE_FEATURE_EDITING) |
2676 | cmdedit_set_initial_prompt(); | ||
2676 | else PS1 = NULL; | 2677 | else PS1 = NULL; |
2677 | PS2 = "> "; | 2678 | PS2 = "> "; |
2678 | 2679 | ||
@@ -2738,7 +2739,7 @@ int hush_main(int argc, char **argv) | |||
2738 | debug_printf("\ninteractive=%d\n", interactive); | 2739 | debug_printf("\ninteractive=%d\n", interactive); |
2739 | if (interactive) { | 2740 | if (interactive) { |
2740 | /* Looks like they want an interactive shell */ | 2741 | /* Looks like they want an interactive shell */ |
2741 | #ifndef CONFIG_FEATURE_SH_EXTRA_QUIET | 2742 | #if !ENABLE_FEATURE_SH_EXTRA_QUIET |
2742 | printf( "\n\n%s hush - the humble shell v0.01 (testing)\n", | 2743 | printf( "\n\n%s hush - the humble shell v0.01 (testing)\n", |
2743 | BB_BANNER); | 2744 | BB_BANNER); |
2744 | printf( "Enter 'help' for a list of built-in commands.\n\n"); | 2745 | printf( "Enter 'help' for a list of built-in commands.\n\n"); |
@@ -2757,7 +2758,7 @@ int hush_main(int argc, char **argv) | |||
2757 | input = xfopen(argv[optind], "r"); | 2758 | input = xfopen(argv[optind], "r"); |
2758 | opt = parse_file_outer(input); | 2759 | opt = parse_file_outer(input); |
2759 | 2760 | ||
2760 | #ifdef CONFIG_FEATURE_CLEAN_UP | 2761 | #if ENABLE_FEATURE_CLEAN_UP |
2761 | fclose(input); | 2762 | fclose(input); |
2762 | if (cwd && cwd != bb_msg_unknown) | 2763 | if (cwd && cwd != bb_msg_unknown) |
2763 | free((char*)cwd); | 2764 | free((char*)cwd); |