Browse Source

bug fix, inp_fix_subckt(): problem when parsing a .subckt line

this worked
  .subckt psub a b p2 = {p1*2-1} p1 = 1
but this failed
  .subckt psub a b p2 = { p1 * 2 - 1 }  p1 = 1

thanks to Ivan Riis Nielsen for the report in Message
  [Ngspice-devel] parsing problem (ngspice-24 tarball)
h_vogt 14 years ago
parent
commit
0a2e031cb1
  1. 5
      src/frontend/inpcom.c

5
src/frontend/inpcom.c

@ -1949,8 +1949,9 @@ inp_fix_subckt( char *s )
head = alloc(struct line);
/* create list of parameters that need to get sorted */
while ( *beg && (ptr1 = strstr( beg, "=" )) != NULL ) {
#ifdef BRACE
/* alternative patch to cope with spaces */
#ifndef NOBRACE
/* alternative patch to cope with spaces:
get expression between braces {...} */
ptr2 = ptr1+1;
ptr1--;
while ( isspace(*ptr1) ) ptr1--;

Loading…
Cancel
Save