Browse Source

cp_variablesubst() and cp_bquote(), rewrite

pre-master-46
rlar 13 years ago
parent
commit
9eab66131d
  1. 3
      src/frontend/parser/backq.c
  2. 3
      src/frontend/variable.c

3
src/frontend/parser/backq.c

@ -37,9 +37,8 @@ cp_bquote(wordlist *wlist)
while (t < s)
wbuf[i++] = *t++;
wbuf[i] = '\0';
(void) strcpy(buf, ++s);
(void) strcpy(buf, ++t);
s = buf;
t++;
while (*s && (*s != cp_back)) {
t++; /* Get s and t past the next backquote. */
s++;

3
src/frontend/variable.c

@ -691,9 +691,8 @@ cp_variablesubst(wordlist *wlist)
while (t < s)
wbuf[i++] = *t++;
wbuf[i] = '\0';
(void) strcpy(buf, ++s);
(void) strcpy(buf, ++t);
s = buf;
t++;
while (*s && (isalphanum(*s) || strchr(VALIDCHARS, *s))) {
/* Get s and t past the end of the var name. */
t++;

Loading…
Cancel
Save