Browse Source

inpcom.c, workaround for "#307 define problems with the Modelname "mname" with Subcircuits"

a diode model named "1smb4148" could not be found
  because it was dropped in `comment_out_unused_subckt_models()'

as a work around the function
  is_a_modelname()
is extended to accept an additional pattern which does match "1smb4148"

Thanks to Martin who submitted the bug report here:
  http://sourceforge.net/p/ngspice/bugs/307/
pre-master-46
rlar 11 years ago
parent
commit
ab5cd17044
  1. 4
      src/frontend/inpcom.c

4
src/frontend/inpcom.c

@ -1604,6 +1604,10 @@ is_a_modelname(const char *s)
if (isdigit(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isdigit(s[3]))
return TRUE;
/* e.g. 1SMB4148 */
if (isdigit(s[0]) && isalpha(s[1]) && isalpha(s[2]) && isalpha(s[3]) && isdigit(s[4]))
return TRUE;
return FALSE;
}

Loading…
Cancel
Save