fix(ext2spice): use ';' instead of '$' for NGSpice end-of-line comments

'$' is only used by NGSpice, for broader compatibility use ';'.
This commit is contained in:
Torleif Skår 2026-06-03 14:38:06 +02:00 committed by R. Timothy Edwards
parent 21b8579734
commit 799fd5d8f2
2 changed files with 10 additions and 10 deletions

View File

@ -757,7 +757,7 @@ spcdevHierVisit(
case DEV_FET: case DEV_FET:
if (source == drain) if (source == drain)
{ {
if (esFormat == NGSPICE) fprintf(esSpiceF, "$ "); if (esFormat == NGSPICE) fprintf(esSpiceF, "; ");
fprintf(esSpiceF, "** SOURCE/DRAIN TIED\n"); fprintf(esSpiceF, "** SOURCE/DRAIN TIED\n");
} }
break; break;
@ -765,7 +765,7 @@ spcdevHierVisit(
default: default:
if (gate == source) if (gate == source)
{ {
if (esFormat == NGSPICE) fprintf(esSpiceF, "$ "); if (esFormat == NGSPICE) fprintf(esSpiceF, "; ");
fprintf(esSpiceF, "** SHORTED DEVICE\n"); fprintf(esSpiceF, "** SHORTED DEVICE\n");
} }
break; break;
@ -1658,7 +1658,7 @@ spcnodeHierVisit(
static char ntmp[MAX_STR_SIZE]; static char ntmp[MAX_STR_SIZE];
EFHNSprintf(ntmp, hierName); EFHNSprintf(ntmp, hierName);
if (esFormat == NGSPICE) fprintf(esSpiceF, " $ "); if (esFormat == NGSPICE) fprintf(esSpiceF, " ; ");
fprintf(esSpiceF, "** %s == %s\n", ntmp, nsn); fprintf(esSpiceF, "** %s == %s\n", ntmp, nsn);
} }
cap = cap / 1000; cap = cap / 1000;
@ -1668,14 +1668,14 @@ spcnodeHierVisit(
esSIvalue(esSpiceF, 1.0E-15 * cap); esSIvalue(esSpiceF, 1.0E-15 * cap);
if (!isConnected) if (!isConnected)
{ {
if (esFormat == NGSPICE) fprintf(esSpiceF, " $"); if (esFormat == NGSPICE) fprintf(esSpiceF, " ;");
fprintf(esSpiceF, " **FLOATING"); fprintf(esSpiceF, " **FLOATING");
} }
fprintf(esSpiceF, "\n"); fprintf(esSpiceF, "\n");
} }
if (node->efnode_attrs && !esNoAttrs) if (node->efnode_attrs && !esNoAttrs)
{ {
if (esFormat == NGSPICE) fprintf(esSpiceF, " $ "); if (esFormat == NGSPICE) fprintf(esSpiceF, " ; ");
fprintf(esSpiceF, "**nodeattr %s :",nsn ); fprintf(esSpiceF, "**nodeattr %s :",nsn );
for (fmt = " %s", ap = node->efnode_attrs; ap; ap = ap->efa_next) for (fmt = " %s", ap = node->efnode_attrs; ap; ap = ap->efa_next)
{ {

View File

@ -2817,7 +2817,7 @@ spcdevVisit(
case DEV_FET: case DEV_FET:
if (source == drain) if (source == drain)
{ {
if (esFormat == NGSPICE) fprintf(esSpiceF, "$ "); if (esFormat == NGSPICE) fprintf(esSpiceF, "; ");
fprintf(esSpiceF, "** SOURCE/DRAIN TIED\n"); fprintf(esSpiceF, "** SOURCE/DRAIN TIED\n");
} }
break; break;
@ -2825,7 +2825,7 @@ spcdevVisit(
default: default:
if (gate == source) if (gate == source)
{ {
if (esFormat == NGSPICE) fprintf(esSpiceF, "$ "); if (esFormat == NGSPICE) fprintf(esSpiceF, "; ");
fprintf(esSpiceF, "** SHORTED DEVICE\n"); fprintf(esSpiceF, "** SHORTED DEVICE\n");
} }
break; break;
@ -4111,7 +4111,7 @@ spcnodeVisit(
static char ntmp[MAX_STR_SIZE]; static char ntmp[MAX_STR_SIZE];
EFHNSprintf(ntmp, hierName); EFHNSprintf(ntmp, hierName);
if (esFormat == NGSPICE) fprintf(esSpiceF, "$ "); if (esFormat == NGSPICE) fprintf(esSpiceF, "; ");
fprintf(esSpiceF, "** %s == %s\n", ntmp, nsn); fprintf(esSpiceF, "** %s == %s\n", ntmp, nsn);
} }
cap = cap / 1000; cap = cap / 1000;
@ -4121,14 +4121,14 @@ spcnodeVisit(
esSIvalue(esSpiceF, 1.0E-15 * cap); esSIvalue(esSpiceF, 1.0E-15 * cap);
if (!isConnected) if (!isConnected)
{ {
if (esFormat == NGSPICE) fprintf(esSpiceF, " $"); if (esFormat == NGSPICE) fprintf(esSpiceF, " ;");
fprintf(esSpiceF, " **FLOATING"); fprintf(esSpiceF, " **FLOATING");
} }
fprintf(esSpiceF, "\n"); fprintf(esSpiceF, "\n");
} }
if (node->efnode_attrs && !esNoAttrs) if (node->efnode_attrs && !esNoAttrs)
{ {
if (esFormat == NGSPICE) fprintf(esSpiceF, " $ "); if (esFormat == NGSPICE) fprintf(esSpiceF, " ; ");
fprintf(esSpiceF, "**nodeattr %s :",nsn ); fprintf(esSpiceF, "**nodeattr %s :",nsn );
for (fmt = " %s", ap = node->efnode_attrs; ap; ap = ap->efa_next) for (fmt = " %s", ap = node->efnode_attrs; ap; ap = ap->efa_next)
{ {