aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2021-06-28 07:46:32 +0100
committerRon Yorston <rmy@pobox.com>2021-06-28 07:46:32 +0100
commite1ad66c0b8fd58a7158d40771175a7dab224202d (patch)
tree959d687eee9637151ad5798322586174de331141 /shell/ash.c
parent0fdf99bee07b6c38795eb5415b5e337ab82cfba8 (diff)
parent5dbbd0a6f52befe6bc57baf97d39168e595197f1 (diff)
downloadbusybox-w32-e1ad66c0b8fd58a7158d40771175a7dab224202d.tar.gz
busybox-w32-e1ad66c0b8fd58a7158d40771175a7dab224202d.tar.bz2
busybox-w32-e1ad66c0b8fd58a7158d40771175a7dab224202d.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/shell/ash.c b/shell/ash.c
index bab6138da..4ae42595d 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -13572,7 +13572,7 @@ parsesub: {
13572 do { 13572 do {
13573 STPUTC(c, out); 13573 STPUTC(c, out);
13574 c = pgetc_eatbnl(); 13574 c = pgetc_eatbnl();
13575 } while (!subtype && isdigit(c)); 13575 } while ((subtype == 0 || subtype == VSLENGTH) && isdigit(c));
13576 } else if (c != '}') { 13576 } else if (c != '}') {
13577 /* $[{[#]]<specialchar>[}] */ 13577 /* $[{[#]]<specialchar>[}] */
13578 int cc = c; 13578 int cc = c;
@@ -13602,11 +13602,6 @@ parsesub: {
13602 } else 13602 } else
13603 goto badsub; 13603 goto badsub;
13604 13604
13605 if (c != '}' && subtype == VSLENGTH) {
13606 /* ${#VAR didn't end with } */
13607 goto badsub;
13608 }
13609
13610 if (subtype == 0) { 13605 if (subtype == 0) {
13611 static const char types[] ALIGN1 = "}-+?="; 13606 static const char types[] ALIGN1 = "}-+?=";
13612 /* ${VAR...} but not $VAR or ${#VAR} */ 13607 /* ${VAR...} but not $VAR or ${#VAR} */
@@ -13663,6 +13658,8 @@ parsesub: {
13663#endif 13658#endif
13664 } 13659 }
13665 } else { 13660 } else {
13661 if (subtype == VSLENGTH && c != '}')
13662 subtype = 0;
13666 badsub: 13663 badsub:
13667 pungetc(); 13664 pungetc();
13668 } 13665 }
@@ -15358,7 +15355,7 @@ init(void)
15358 15355
15359 15356
15360//usage:#define ash_trivial_usage 15357//usage:#define ash_trivial_usage
15361//usage: "[-il] [-/+Cabefmnuvx] [-/+o OPT]... [-c 'SCRIPT' [ARG0 [ARGS]] / FILE [ARGS] / -s [ARGS]]" 15358//usage: "[-il] [-|+Cabefmnuvx] [-|+o OPT]... [-c 'SCRIPT' [ARG0 ARGS] | FILE [ARGS] | -s [ARGS]]"
15362//////// comes from ^^^^^^^^^^optletters 15359//////// comes from ^^^^^^^^^^optletters
15363//usage:#define ash_full_usage "\n\n" 15360//usage:#define ash_full_usage "\n\n"
15364//usage: "Unix shell interpreter" 15361//usage: "Unix shell interpreter"