Browse Source

Improve detection of the number of terminals for bipolar devices.

Fixes bug no. 807.
pre-master-46
Holger Vogt 6 months ago
parent
commit
2b1dc09caf
  1. 16
      src/frontend/inpcom.c

16
src/frontend/inpcom.c

@ -5286,8 +5286,7 @@ int get_number_terminals(char *c)
char* comma; char* comma;
name[i] = gettok_instance(&cc); name[i] = gettok_instance(&cc);
if (search_plain_identifier(name[i], "off") ||
strchr(name[i], '=')) {
if (search_plain_identifier(name[i], "off")) {
j++; j++;
} }
#ifdef CIDER #ifdef CIDER
@ -5296,16 +5295,9 @@ int get_number_terminals(char *c)
j++; j++;
} }
#endif #endif
/* If we have IC=VBE, VCE instead of IC=VBE,VCE
* we need to increment j.
*/
if ((comma = strchr(name[i], ',')) != NULL &&
(*(++comma) == '\0'))
j++;
/* If we have IC=VBE , VCE ("," is a token) we need to inc j
*/
if (eq(name[i], ","))
j++;
if (strchr(name[i], '=')) {
break;
}
} }
i--; i--;
tfree(ccfree); tfree(ccfree);

Loading…
Cancel
Save