From a809361d6914604b26e5a1063ffe7be5ad5bdd34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torleif=20Sk=C3=A5r?= <16509259+tskaar@users.noreply.github.com> Date: Wed, 3 Jun 2026 14:38:06 +0200 Subject: [PATCH] fix(ext2spice): use ';' instead of '$' for NGSpice end-of-line comments '$' is only used by NGSpice, for broader compatibility use ';'. --- ext2spice/ext2hier.c | 10 +++++----- ext2spice/ext2spice.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ext2spice/ext2hier.c b/ext2spice/ext2hier.c index cb7a94e5..a6bfa79a 100644 --- a/ext2spice/ext2hier.c +++ b/ext2spice/ext2hier.c @@ -757,7 +757,7 @@ spcdevHierVisit( case DEV_FET: if (source == drain) { - if (esFormat == NGSPICE) fprintf(esSpiceF, "$ "); + if (esFormat == NGSPICE) fprintf(esSpiceF, "; "); fprintf(esSpiceF, "** SOURCE/DRAIN TIED\n"); } break; @@ -765,7 +765,7 @@ spcdevHierVisit( default: if (gate == source) { - if (esFormat == NGSPICE) fprintf(esSpiceF, "$ "); + if (esFormat == NGSPICE) fprintf(esSpiceF, "; "); fprintf(esSpiceF, "** SHORTED DEVICE\n"); } break; @@ -1658,7 +1658,7 @@ spcnodeHierVisit( static char ntmp[MAX_STR_SIZE]; EFHNSprintf(ntmp, hierName); - if (esFormat == NGSPICE) fprintf(esSpiceF, " $ "); + if (esFormat == NGSPICE) fprintf(esSpiceF, " ; "); fprintf(esSpiceF, "** %s == %s\n", ntmp, nsn); } cap = cap / 1000; @@ -1668,14 +1668,14 @@ spcnodeHierVisit( esSIvalue(esSpiceF, 1.0E-15 * cap); if (!isConnected) { - if (esFormat == NGSPICE) fprintf(esSpiceF, " $"); + if (esFormat == NGSPICE) fprintf(esSpiceF, " ;"); fprintf(esSpiceF, " **FLOATING"); } fprintf(esSpiceF, "\n"); } if (node->efnode_attrs && !esNoAttrs) { - if (esFormat == NGSPICE) fprintf(esSpiceF, " $ "); + if (esFormat == NGSPICE) fprintf(esSpiceF, " ; "); fprintf(esSpiceF, "**nodeattr %s :",nsn ); for (fmt = " %s", ap = node->efnode_attrs; ap; ap = ap->efa_next) { diff --git a/ext2spice/ext2spice.c b/ext2spice/ext2spice.c index 45a6696c..0c3a0094 100644 --- a/ext2spice/ext2spice.c +++ b/ext2spice/ext2spice.c @@ -2817,7 +2817,7 @@ spcdevVisit( case DEV_FET: if (source == drain) { - if (esFormat == NGSPICE) fprintf(esSpiceF, "$ "); + if (esFormat == NGSPICE) fprintf(esSpiceF, "; "); fprintf(esSpiceF, "** SOURCE/DRAIN TIED\n"); } break; @@ -2825,7 +2825,7 @@ spcdevVisit( default: if (gate == source) { - if (esFormat == NGSPICE) fprintf(esSpiceF, "$ "); + if (esFormat == NGSPICE) fprintf(esSpiceF, "; "); fprintf(esSpiceF, "** SHORTED DEVICE\n"); } break; @@ -4111,7 +4111,7 @@ spcnodeVisit( static char ntmp[MAX_STR_SIZE]; EFHNSprintf(ntmp, hierName); - if (esFormat == NGSPICE) fprintf(esSpiceF, "$ "); + if (esFormat == NGSPICE) fprintf(esSpiceF, "; "); fprintf(esSpiceF, "** %s == %s\n", ntmp, nsn); } cap = cap / 1000; @@ -4121,14 +4121,14 @@ spcnodeVisit( esSIvalue(esSpiceF, 1.0E-15 * cap); if (!isConnected) { - if (esFormat == NGSPICE) fprintf(esSpiceF, " $"); + if (esFormat == NGSPICE) fprintf(esSpiceF, " ;"); fprintf(esSpiceF, " **FLOATING"); } fprintf(esSpiceF, "\n"); } if (node->efnode_attrs && !esNoAttrs) { - if (esFormat == NGSPICE) fprintf(esSpiceF, " $ "); + if (esFormat == NGSPICE) fprintf(esSpiceF, " ; "); fprintf(esSpiceF, "**nodeattr %s :",nsn ); for (fmt = " %s", ap = node->efnode_attrs; ap; ap = ap->efa_next) {