From 88d0727d3f77833289679fb438d3d9c0dbac8cab Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sat, 6 Jan 2024 11:51:11 +0100 Subject: [PATCH] In PS compat mode we only have 2 nodes in a diode, but still allow self heating diode with ngspice syntax. --- src/frontend/inpcom.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 32d57d22b..922393c5c 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -4853,6 +4853,10 @@ int get_number_terminals(char *c) return 2; break; case 'd': + /* PS: D <(+) node> <(-) node> [area value], + but still allow self heating diode with ngspice syntax. */ + if (newcompat.ps && !search_plain_identifier(c, "thermal")) + return 2; i = 0; /* find the first token with "off" or "=" in the line*/ while ((i < 10) && (*c != '\0')) {