findsubckt(), fix lvalue
This commit is contained in:
parent
78147c2bd9
commit
cd05eb1d50
|
|
@ -547,7 +547,7 @@ findsubckt(dico_t *dico, const char * const s)
|
||||||
/* input: s is a subcircuit invocation line.
|
/* input: s is a subcircuit invocation line.
|
||||||
returns 0 if not found, else the stored definition line number value */
|
returns 0 if not found, else the stored definition line number value */
|
||||||
{
|
{
|
||||||
const char *k_ptr;
|
const char *k_ptr = s + strlen(s);
|
||||||
|
|
||||||
entry_t *entry; /* symbol table entry */
|
entry_t *entry; /* symbol table entry */
|
||||||
SPICE_DSTRING ustr; /* u= subckt name is last token in string s */
|
SPICE_DSTRING ustr; /* u= subckt name is last token in string s */
|
||||||
|
|
@ -556,15 +556,13 @@ findsubckt(dico_t *dico, const char * const s)
|
||||||
|
|
||||||
spice_dstring_init(&ustr);
|
spice_dstring_init(&ustr);
|
||||||
|
|
||||||
(k_ptr - s) = (int) strlen(s);
|
|
||||||
|
|
||||||
while (((k_ptr - s) >= 0) && (s[(k_ptr - s)] <= ' '))
|
while (((k_ptr - s) >= 0) && (s[(k_ptr - s)] <= ' '))
|
||||||
(k_ptr - s)--;
|
k_ptr--;
|
||||||
|
|
||||||
j = (int) (k_ptr - s);
|
j = (int) (k_ptr - s);
|
||||||
|
|
||||||
while (((k_ptr - s) >= 0) && (s[(k_ptr - s)] > ' '))
|
while (((k_ptr - s) >= 0) && (s[(k_ptr - s)] > ' '))
|
||||||
(k_ptr - s)--;
|
k_ptr--;
|
||||||
|
|
||||||
pscopy_up(&ustr, s, (int) (k_ptr - s) + 1, j - (int) (k_ptr - s));
|
pscopy_up(&ustr, s, (int) (k_ptr - s) + 1, j - (int) (k_ptr - s));
|
||||||
entry = entrynb(dico, spice_dstring_value(&ustr));
|
entry = entrynb(dico, spice_dstring_value(&ustr));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue