aboutsummaryrefslogtreecommitdiff
path: root/shell/hush.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2025-09-11 08:38:17 +0100
committerRon Yorston <rmy@pobox.com>2025-09-11 08:44:20 +0100
commit3b6f6f703fce2b9c984b7d2d051567c98f29a2e6 (patch)
treed642f63ba158111cd3aaca74d0641274f37c8230 /shell/hush.c
parentc53706d6323bb25a4d68829b1070ec1539c08d94 (diff)
parent3681b5f618a1f93e62b3584676117818f230c31e (diff)
downloadbusybox-w32-3b6f6f703fce2b9c984b7d2d051567c98f29a2e6.tar.gz
busybox-w32-3b6f6f703fce2b9c984b7d2d051567c98f29a2e6.tar.bz2
busybox-w32-3b6f6f703fce2b9c984b7d2d051567c98f29a2e6.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'shell/hush.c')
-rw-r--r--shell/hush.c16
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 */