diff options
Diffstat (limited to 'shell/hush.c')
| -rw-r--r-- | shell/hush.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/shell/hush.c b/shell/hush.c index 226a6d68f..da0db7948 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
| @@ -683,6 +683,7 @@ struct command { | |||
| 683 | # endif | 683 | # endif |
| 684 | # define CMD_FUNCDEF 5 | 684 | # define CMD_FUNCDEF 5 |
| 685 | #endif | 685 | #endif |
| 686 | /* ^^^ if you change this, update CMDTYPE[] array too */ | ||
| 686 | 687 | ||
| 687 | smalluint cmd_exitcode; | 688 | smalluint cmd_exitcode; |
| 688 | /* if non-NULL, this "command" is { list }, ( list ), or a compound statement */ | 689 | /* if non-NULL, this "command" is { list }, ( list ), or a compound statement */ |
| @@ -3947,7 +3948,7 @@ static void debug_print_tree(struct pipe *pi, int lvl) | |||
| 3947 | # endif | 3948 | # endif |
| 3948 | # if ENABLE_HUSH_CASE | 3949 | # if ENABLE_HUSH_CASE |
| 3949 | [RES_CASE ] = "CASE" , | 3950 | [RES_CASE ] = "CASE" , |
| 3950 | [RES_CASE_IN] = "CASE_IN" , | 3951 | [RES_CASE_IN] = "CASE_IN", |
| 3951 | [RES_MATCH] = "MATCH", | 3952 | [RES_MATCH] = "MATCH", |
| 3952 | [RES_CASE_BODY] = "CASE_BODY", | 3953 | [RES_CASE_BODY] = "CASE_BODY", |
| 3953 | [RES_ESAC ] = "ESAC" , | 3954 | [RES_ESAC ] = "ESAC" , |
| @@ -3956,11 +3957,13 @@ static void debug_print_tree(struct pipe *pi, int lvl) | |||
| 3956 | [RES_SNTX ] = "SNTX" , | 3957 | [RES_SNTX ] = "SNTX" , |
| 3957 | }; | 3958 | }; |
| 3958 | static const char *const CMDTYPE[] ALIGN_PTR = { | 3959 | static const char *const CMDTYPE[] ALIGN_PTR = { |
| 3959 | "{}", | 3960 | "{}", //CMD_NORMAL |
| 3960 | "()", | 3961 | "()", //CMD_SUBSHELL |
| 3961 | "[noglob]", | 3962 | "[test2]", //CMD_TEST2_SINGLEWORD_NOGLOB |
| 3963 | "[noglob]", //CMD_SINGLEWORD_NOGLOB | ||
| 3962 | # if ENABLE_HUSH_FUNCTIONS | 3964 | # if ENABLE_HUSH_FUNCTIONS |
| 3963 | "func()", | 3965 | "func()", //CMD_FUNCTION_KWORD |
| 3966 | "funcdef", //CMD_FUNCDEF | ||
| 3964 | # endif | 3967 | # endif |
| 3965 | }; | 3968 | }; |
| 3966 | 3969 | ||
| @@ -12988,9 +12991,6 @@ static int FAST_FUNC builtin_alias(char **argv) | |||
| 12988 | } | 12991 | } |
| 12989 | 12992 | ||
| 12990 | while (*++argv) { | 12993 | while (*++argv) { |
| 12991 | /* The characters /, $, `, = and any of the shell | ||
| 12992 | * metacharacters or quoting characters | ||
| 12993 | * may not appear in an alias name */ | ||
| 12994 | char *eq = end_of_alias_name(*argv); | 12994 | char *eq = end_of_alias_name(*argv); |
| 12995 | if (*eq == '=' && eq != *argv) { | 12995 | if (*eq == '=' && eq != *argv) { |
| 12996 | /* alias NAME=VALUE */ | 12996 | /* alias NAME=VALUE */ |
