Browse Source

findsubckt(), j ==> j_ptr - (const) s

pre-master-46
rlar 8 years ago
parent
commit
940eb2a258
  1. 6
      src/frontend/numparam/xpressn.c

6
src/frontend/numparam/xpressn.c

@ -548,10 +548,10 @@ findsubckt(dico_t *dico, const char * const s)
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 = s + strlen(s); const char *k_ptr = s + strlen(s);
const char *j_ptr;
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 */
int j;
int line; /* stored line number */ int line; /* stored line number */
spice_dstring_init(&ustr); spice_dstring_init(&ustr);
@ -559,12 +559,12 @@ findsubckt(dico_t *dico, const char * const s)
while (((k_ptr - s) >= 0) && (s[(k_ptr - s)] <= ' ')) while (((k_ptr - s) >= 0) && (s[(k_ptr - s)] <= ' '))
k_ptr--; k_ptr--;
j = (int) (k_ptr - s);
(j_ptr - s) = (int) (k_ptr - s);
while (((k_ptr - s) >= 0) && (s[(k_ptr - s)] > ' ')) while (((k_ptr - s) >= 0) && (s[(k_ptr - s)] > ' '))
k_ptr--; 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, (int) (j_ptr - s) - (int) (k_ptr - s));
entry = entrynb(dico, spice_dstring_value(&ustr)); entry = entrynb(dico, spice_dstring_value(&ustr));
if (entry && (entry->tp == NUPA_SUBCKT)) { if (entry && (entry->tp == NUPA_SUBCKT)) {

Loading…
Cancel
Save