diff --git a/src/frontend/breakp2.c b/src/frontend/breakp2.c index afef15e63..8e2748a68 100644 --- a/src/frontend/breakp2.c +++ b/src/frontend/breakp2.c @@ -65,30 +65,22 @@ settrace(wordlist *wl, int what, char *name) char *s = cp_unquote(wl->wl_word); char *db_nodename1 = NULL; char db_type = 0; - if (eq(s, "all")) { + if (eq(s, "all") || eq(s, "nosub")) { switch (what) { case VF_PRINT: db_type = DB_TRACEALL; break; - /* case VF_PLOT: - db_type = DB_IPLOTALL; - break; */ case VF_ACCUM: - /* db_type = DB_SAVEALL; */ db_nodename1 = copy(s); db_type = DB_SAVE; break; } tfree(s); - /* wrd_chtrace(NULL, TRUE, what); */ } else { switch (what) { case VF_PRINT: db_type = DB_TRACENODE; break; -/* case VF_PLOT: - db_type = DB_IPLOT; - break; */ case VF_ACCUM: db_type = DB_SAVE; break; @@ -98,7 +90,6 @@ settrace(wordlist *wl, int what, char *name) tfree(s); if (!db_nodename1) /* skip on error */ continue; - /* wrd_chtrace(s, TRUE, what); */ } /* Don't save a nodename more than once */ diff --git a/src/frontend/outitf.c b/src/frontend/outitf.c index 29d3fb54f..38cff9194 100644 --- a/src/frontend/outitf.c +++ b/src/frontend/outitf.c @@ -143,6 +143,7 @@ beginPlot(JOB *analysisPtr, CKTcircuit *circuitPtr, char *cktName, char *analNam char *ch, tmpname[BSIZE_SP]; bool saveall = TRUE; bool savealli = FALSE; + bool savenosub = FALSE; char *an_name; int initmem; /*to resume a run saj @@ -213,6 +214,13 @@ beginPlot(JOB *analysisPtr, CKTcircuit *circuitPtr, char *cktName, char *analNam saves[i].used = 1; continue; } + + if (cieq(saves[i].name, "nosub")) { + savenosub = TRUE; + savesused[i] = TRUE; + saves[i].used = 1; + continue; + } #ifdef SHARED_MODULE /* this may happen if shared ngspice*/ if (cieq(saves[i].name, "none")) { @@ -226,7 +234,7 @@ beginPlot(JOB *analysisPtr, CKTcircuit *circuitPtr, char *cktName, char *analNam } } - if (numsaves && !saveall) + if (numsaves && !saveall && !savenosub) initmem = numsaves; else initmem = numNames; @@ -245,7 +253,7 @@ beginPlot(JOB *analysisPtr, CKTcircuit *circuitPtr, char *cktName, char *analNam /* Pass 1. */ - if (numsaves && !saveall) { + if (numsaves && !saveall && !savenosub) { for (i = 0; i < numsaves; i++) { if (!savesused[i]) { for (j = 0; j < numNames; j++) { @@ -269,7 +277,8 @@ beginPlot(JOB *analysisPtr, CKTcircuit *circuitPtr, char *cktName, char *analNam for (i = 0; i < numNames; i++) if (!refName || !name_eq(dataNames[i], refName)) /* Save the node as long as it's not an internal device node */ - if (!strstr(dataNames[i], "#internal") && + if (!(savenosub && strchr(dataNames[i], '.')) && /* don't save subckt nodes */ + !strstr(dataNames[i], "#internal") && !strstr(dataNames[i], "#source") && !strstr(dataNames[i], "#drain") && !strstr(dataNames[i], "#collector") &&