stripsomespace(), drop `ls'
This commit is contained in:
parent
cc05c0c05b
commit
ca84d10d0a
|
|
@ -78,14 +78,13 @@ stripsomespace(SPICE_DSTRINGPTR dstr_p, bool incontrol)
|
||||||
: "*.&+#$" "xX";
|
: "*.&+#$" "xX";
|
||||||
|
|
||||||
char *s = spice_dstring_value(dstr_p);
|
char *s = spice_dstring_value(dstr_p);
|
||||||
int ls = spice_dstring_length(dstr_p);
|
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while ((i < ls) && (s[i] <= ' '))
|
while (s[i] && (s[i] <= ' '))
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
if ((i > 0) && (i < ls) && strchr(markers, s[i]))
|
if ((i > 0) && s[i] && strchr(markers, s[i]))
|
||||||
pscopy(dstr_p, s, i, ls);
|
pscopy(dstr_p, s + i, 0, (int) strlen(s + i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue