sh: Simplify code by removing variable bracketed_name.
This commit is contained in:
parent
adb023ae59
commit
d72505899b
@ -1616,7 +1616,6 @@ parsesub: {
|
|||||||
int flags;
|
int flags;
|
||||||
char *p;
|
char *p;
|
||||||
static const char types[] = "}-+?=";
|
static const char types[] = "}-+?=";
|
||||||
int bracketed_name = 0; /* used to handle ${[0-9]*} variables */
|
|
||||||
int linno;
|
int linno;
|
||||||
int length;
|
int length;
|
||||||
int c1;
|
int c1;
|
||||||
@ -1640,7 +1639,6 @@ parsesub: {
|
|||||||
subtype = VSNORMAL;
|
subtype = VSNORMAL;
|
||||||
flags = 0;
|
flags = 0;
|
||||||
if (c == '{') {
|
if (c == '{') {
|
||||||
bracketed_name = 1;
|
|
||||||
c = pgetc_linecont();
|
c = pgetc_linecont();
|
||||||
subtype = 0;
|
subtype = 0;
|
||||||
}
|
}
|
||||||
@ -1665,7 +1663,7 @@ varname:
|
|||||||
flags |= VSLINENO;
|
flags |= VSLINENO;
|
||||||
}
|
}
|
||||||
} else if (is_digit(c)) {
|
} else if (is_digit(c)) {
|
||||||
if (bracketed_name) {
|
if (subtype != VSNORMAL) {
|
||||||
do {
|
do {
|
||||||
STPUTC(c, out);
|
STPUTC(c, out);
|
||||||
c = pgetc_linecont();
|
c = pgetc_linecont();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user