stripbraces(), group `s + i'
This commit is contained in:
parent
0101db946b
commit
ab15f0b7bb
|
|
@ -92,15 +92,14 @@ static int
|
||||||
stripbraces(SPICE_DSTRINGPTR dstr_p)
|
stripbraces(SPICE_DSTRINGPTR dstr_p)
|
||||||
/* puts the funny placeholders. returns the number of {...} substitutions */
|
/* puts the funny placeholders. returns the number of {...} substitutions */
|
||||||
{
|
{
|
||||||
int n, i, nest;
|
int n, nest;
|
||||||
char *s; /* value of dynamic string */
|
char *s = spice_dstring_value(dstr_p);
|
||||||
char *brace;
|
char *brace;
|
||||||
SPICE_DSTRING tstr; /* temporary dynamic string */
|
SPICE_DSTRING tstr; /* temporary dynamic string */
|
||||||
|
|
||||||
n = 0;
|
n = 0;
|
||||||
spice_dstring_init(&tstr);
|
spice_dstring_init(&tstr);
|
||||||
s = spice_dstring_value(dstr_p);
|
s + i = s;
|
||||||
i = 0;
|
|
||||||
|
|
||||||
while ((brace = strchr(s + i, '{')) != NULL) {
|
while ((brace = strchr(s + i, '{')) != NULL) {
|
||||||
|
|
||||||
|
|
@ -137,7 +136,7 @@ stripbraces(SPICE_DSTRINGPTR dstr_p)
|
||||||
sadd(&tstr, j_ptr);
|
sadd(&tstr, j_ptr);
|
||||||
scopyd(dstr_p, &tstr);
|
scopyd(dstr_p, &tstr);
|
||||||
s = spice_dstring_value(dstr_p);
|
s = spice_dstring_value(dstr_p);
|
||||||
i = ilen;
|
s + i = s + ilen;
|
||||||
}
|
}
|
||||||
|
|
||||||
dynsubst = placeholder;
|
dynsubst = placeholder;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue