Browse Source

enforce reset

h_vogt 14 years ago
parent
commit
2784ae5aa9
  1. 4
      ChangeLog
  2. 21
      src/frontend/runcoms.c

4
ChangeLog

@ -1,6 +1,8 @@
2012-01-01 Holger Vogt 2012-01-01 Holger Vogt
* inpcom.c, main.c, compatmode.h:
* inpcom.c, main.c, compatmode.h, spinit.in:
.lib handling depends on input to compatmode .lib handling depends on input to compatmode
* runcoms.c: enforce 'reset' after tran, op, etc. before next
simulation is started
2011-12-30 Holger Vogt 2011-12-30 Holger Vogt
* b4v5dest.c, b4dest.c, b3dest, b3v32.dest : memory leaks reduced * b4v5dest.c, b4dest.c, b3dest, b3v32.dest : memory leaks reduced

21
src/frontend/runcoms.c

@ -46,6 +46,7 @@ char rawfileBuf[RAWBUF_SIZE];
/*To tell resume the rawfile name saj*/ /*To tell resume the rawfile name saj*/
char *last_used_rawfile = NULL; char *last_used_rawfile = NULL;
/*end saj */ /*end saj */
static bool firstrundone = FALSE;
/* command "setcirc" */ /* command "setcirc" */
void void
@ -109,6 +110,7 @@ void
com_pz(wordlist *wl) com_pz(wordlist *wl)
{ {
dosim("pz", wl); dosim("pz", wl);
firstrundone = TRUE;
return; return;
} }
@ -116,6 +118,7 @@ void
com_op(wordlist *wl) com_op(wordlist *wl)
{ {
dosim("op", wl); dosim("op", wl);
firstrundone = TRUE;
return; return;
} }
@ -123,6 +126,7 @@ void
com_dc(wordlist *wl) com_dc(wordlist *wl)
{ {
dosim("dc", wl); dosim("dc", wl);
firstrundone = TRUE;
return; return;
} }
@ -130,6 +134,7 @@ void
com_ac(wordlist *wl) com_ac(wordlist *wl)
{ {
dosim("ac", wl); dosim("ac", wl);
firstrundone = TRUE;
return; return;
} }
@ -137,6 +142,7 @@ void
com_tf(wordlist *wl) com_tf(wordlist *wl)
{ {
dosim("tf", wl); dosim("tf", wl);
firstrundone = TRUE;
return; return;
} }
@ -144,6 +150,7 @@ void
com_tran(wordlist *wl) com_tran(wordlist *wl)
{ {
dosim("tran", wl); dosim("tran", wl);
firstrundone = TRUE;
return; return;
} }
@ -151,6 +158,7 @@ void
com_sens(wordlist *wl) com_sens(wordlist *wl)
{ {
dosim("sens", wl); dosim("sens", wl);
firstrundone = TRUE;
return; return;
} }
@ -158,6 +166,7 @@ void
com_disto(wordlist *wl) com_disto(wordlist *wl)
{ {
dosim("disto", wl); dosim("disto", wl);
firstrundone = TRUE;
return; return;
} }
@ -165,6 +174,7 @@ void
com_noise(wordlist *wl) com_noise(wordlist *wl)
{ {
dosim("noise", wl); dosim("noise", wl);
firstrundone = TRUE;
return; return;
} }
@ -173,6 +183,7 @@ void
com_pss(wordlist *wl) com_pss(wordlist *wl)
{ {
dosim("pss", wl); dosim("pss", wl);
firstrundone = TRUE;
return; return;
} }
/* SP */ /* SP */
@ -195,6 +206,8 @@ dosim(
/* set file type to binary or to what is given by environmental /* set file type to binary or to what is given by environmental
variable SPICE_ASCIIRAWFILE in ivars.c */ variable SPICE_ASCIIRAWFILE in ivars.c */
bool ascii = AsciiRawFile; bool ascii = AsciiRawFile;
if (firstrundone)
com_rset(NULL);
if (eq(what, "run") && wl) if (eq(what, "run") && wl)
dofile = TRUE; dofile = TRUE;
/* add "what" to beginning of wordlist wl, except "what" equals "run" /* add "what" to beginning of wordlist wl, except "what" equals "run"
@ -372,6 +385,7 @@ com_run(wordlist *wl)
{ {
/* ft_getsaves(); */ /* ft_getsaves(); */
dosim("run", wl); dosim("run", wl);
firstrundone = TRUE;
return; return;
} }
@ -382,9 +396,10 @@ ft_dorun(char *file)
wl.wl_word = file; wl.wl_word = file;
if (file) if (file)
return dosim("run", &wl);
else
return dosim("run", NULL);
return dosim("run", &wl);
else {
return dosim("run", NULL);
}
} }
/* ARGSUSED */ /* until the else clause gets put back */ /* ARGSUSED */ /* until the else clause gets put back */

Loading…
Cancel
Save