pscopy(), pscopy_up(), use _spice_dstring_setlength() return value
instead of invoking spice_dstring_value()
This commit is contained in:
parent
2ce91b0821
commit
e21d48a267
|
|
@ -185,8 +185,7 @@ pscopy(SPICE_DSTRINGPTR dstr_p, const char *t, int leng)
|
||||||
if (leng > stop)
|
if (leng > stop)
|
||||||
leng = stop;
|
leng = stop;
|
||||||
|
|
||||||
_spice_dstring_setlength(dstr_p, leng);
|
s_p = _spice_dstring_setlength(dstr_p, leng);
|
||||||
s_p = spice_dstring_value(dstr_p);
|
|
||||||
|
|
||||||
for (i = 0; i < leng; i++)
|
for (i = 0; i < leng; i++)
|
||||||
s_p[i] = t[i];
|
s_p[i] = t[i];
|
||||||
|
|
@ -219,8 +218,7 @@ pscopy_up(SPICE_DSTRINGPTR dstr_p, const char *t, int leng)
|
||||||
if (leng > stop)
|
if (leng > stop)
|
||||||
leng = stop;
|
leng = stop;
|
||||||
|
|
||||||
_spice_dstring_setlength(dstr_p, leng);
|
s_p = _spice_dstring_setlength(dstr_p, leng);
|
||||||
s_p = spice_dstring_value(dstr_p);
|
|
||||||
|
|
||||||
for (i = 0; i < leng; i++)
|
for (i = 0; i < leng; i++)
|
||||||
s_p[i] = toupper_c(t[i]);
|
s_p[i] = toupper_c(t[i]);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue