cp_variablesubst() and cp_bquote(), rewrite

This commit is contained in:
rlar 2013-07-30 21:35:56 +02:00
parent c2927128cd
commit 9eab66131d
2 changed files with 2 additions and 4 deletions

View File

@ -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++;

View File

@ -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++;