[Pkg-electronics-commits] [gnucap] 36/47: transient-3: bug fix - crash when continuing transient after mod.

felix salfelder felix-guest at moszumanska.debian.org
Mon Sep 26 10:37:40 UTC 2016


This is an automated email from the git hooks/post-receive script.

felix-guest pushed a commit to branch master
in repository gnucap.

commit dab441f02dd07263a511693bf89e8f12c92264ea
Author: al davis <ad211 at freeelectron.net>
Date:   Tue Sep 20 00:19:15 2016 -0400

    transient-3: bug fix - crash when continuing transient after mod.
---
 apps/s_tr_set.cc          |  6 +++++-
 include/patchlev.h        |  2 +-
 lib/u_lang.cc             |  2 +-
 tests/==out/s_tr.2.gc.out | 35 +++++++++++++++++++++++++++++++++++
 tests/==out/s_tr.3.gc.out | 31 +++++++++++++++++++++++++++++++
 tests/==out/s_tr.4.gc.out | 30 ++++++++++++++++++++++++++++++
 tests/==out/s_tr.5.gc.out | 30 ++++++++++++++++++++++++++++++
 tests/s_tr.2.gc           |  8 ++++++++
 tests/s_tr.3.gc           |  9 +++++++++
 tests/s_tr.4.gc           |  8 ++++++++
 tests/s_tr.5.gc           |  8 ++++++++
 11 files changed, 166 insertions(+), 3 deletions(-)

diff --git a/apps/s_tr_set.cc b/apps/s_tr_set.cc
index b43cef3..0bd18f6 100644
--- a/apps/s_tr_set.cc
+++ b/apps/s_tr_set.cc
@@ -39,7 +39,11 @@ void TRANSIENT::setup(CS& Cmd)
   _tstop.e_val(NOT_INPUT, _scope);
   _tstrobe.e_val(NOT_INPUT, _scope);
 
-  _cont = true;
+  if (_sim->is_first_expand()) {
+    _sim->_last_time = 0;
+  }else{
+  }
+
   if (Cmd.match1("'\"({") || Cmd.is_pfloat()) {
     PARAMETER<double> arg1, arg2, arg3;
     Cmd >> arg1;
diff --git a/include/patchlev.h b/include/patchlev.h
index f2f5a47..e5a85ec 100644
--- a/include/patchlev.h
+++ b/include/patchlev.h
@@ -1 +1 @@
-#define PATCHLEVEL "transient-3 2016.09.19"
+#define PATCHLEVEL "transient-3 2016.09.20"
diff --git a/lib/u_lang.cc b/lib/u_lang.cc
index d7d36e2..9b4f58e 100644
--- a/lib/u_lang.cc
+++ b/lib/u_lang.cc
@@ -72,7 +72,7 @@ const CARD* LANGUAGE::find_proto(const std::string& Name, const CARD* Scope)
     assert(!p);
     std::string s;
     /* */if (Umatch(Name, "b{uild} "))      {untested(); s = "build";}
-    else if (Umatch(Name, "del{ete} "))     {untested(); s = "delete";}
+    else if (Umatch(Name, "del{ete} "))     {		 s = "delete";}
     else if (Umatch(Name, "fo{urier} "))    {untested(); s = "fourier";}
     else if (Umatch(Name, "gen{erator} "))  {		 s = "generator";}
     else if (Umatch(Name, "inc{lude} "))    {untested(); s = "include";}
diff --git a/tests/==out/s_tr.2.gc.out b/tests/==out/s_tr.2.gc.out
new file mode 100644
index 0000000..7c09471
--- /dev/null
+++ b/tests/==out/s_tr.2.gc.out
@@ -0,0 +1,35 @@
+"v1 (1 0) pulse (0 1) "
+".print tran v(1) "
+".tran 0 1 .1 "
+#Time       v(1)      
+ 0.         0.        
+ 0.1        1.        
+ 0.2        1.        
+ 0.3        1.        
+ 0.4        1.        
+ 0.5        1.        
+ 0.6        1.        
+ 0.7        1.        
+ 0.8        1.        
+ 0.9        1.        
+ 1.         1.        
+"r1 (2 0) 1 "
+".tran trace all "
+#Time       v(1)      
+ 0.         0.        
+ 0.001      1.        
+ 0.002      1.        
+ 0.003      1.        
+ 0.004      1.        
+ 0.005      1.        
+ 0.1        1.        
+ 0.2        1.        
+ 0.3        1.        
+ 0.4        1.        
+ 0.5        1.        
+ 0.6        1.        
+ 0.7        1.        
+ 0.8        1.        
+ 0.9        1.        
+ 1.         1.        
+".end "
diff --git a/tests/==out/s_tr.3.gc.out b/tests/==out/s_tr.3.gc.out
new file mode 100644
index 0000000..7733708
--- /dev/null
+++ b/tests/==out/s_tr.3.gc.out
@@ -0,0 +1,31 @@
+"v1 (1 0) pulse (0 1) "
+"r1 (2 0) 1 "
+".print tran v(1) "
+".tran 0 1 .1 "
+#Time       v(1)      
+ 0.         0.        
+ 0.1        1.        
+ 0.2        1.        
+ 0.3        1.        
+ 0.4        1.        
+ 0.5        1.        
+ 0.6        1.        
+ 0.7        1.        
+ 0.8        1.        
+ 0.9        1.        
+ 1.         1.        
+".del r1 "
+".tran "
+#Time       v(1)      
+ 0.         0.        
+ 0.1        1.        
+ 0.2        1.        
+ 0.3        1.        
+ 0.4        1.        
+ 0.5        1.        
+ 0.6        1.        
+ 0.7        1.        
+ 0.8        1.        
+ 0.9        1.        
+ 1.         1.        
+".end "
diff --git a/tests/==out/s_tr.4.gc.out b/tests/==out/s_tr.4.gc.out
new file mode 100644
index 0000000..b40943d
--- /dev/null
+++ b/tests/==out/s_tr.4.gc.out
@@ -0,0 +1,30 @@
+"v1 (1 0) pulse (0 1) "
+"r1 (2 0) 1 "
+".print tran v(1) "
+".tran 0 1 .1 "
+#Time       v(1)      
+ 0.         0.        
+ 0.1        1.        
+ 0.2        1.        
+ 0.3        1.        
+ 0.4        1.        
+ 0.5        1.        
+ 0.6        1.        
+ 0.7        1.        
+ 0.8        1.        
+ 0.9        1.        
+ 1.         1.        
+".tran "
+#Time       v(1)      
+ 1.         1.        
+ 1.1        1.        
+ 1.2        1.        
+ 1.3        1.        
+ 1.4        1.        
+ 1.5        1.        
+ 1.6        1.        
+ 1.7        1.        
+ 1.8        1.        
+ 1.9        1.        
+ 2.         1.        
+".end "
diff --git a/tests/==out/s_tr.5.gc.out b/tests/==out/s_tr.5.gc.out
new file mode 100644
index 0000000..b232f79
--- /dev/null
+++ b/tests/==out/s_tr.5.gc.out
@@ -0,0 +1,30 @@
+"v1 (1 0) pulse (0 1) "
+".print tran v(1) "
+".tran 0 1 .1 "
+#Time       v(1)      
+ 0.         0.        
+ 0.1        1.        
+ 0.2        1.        
+ 0.3        1.        
+ 0.4        1.        
+ 0.5        1.        
+ 0.6        1.        
+ 0.7        1.        
+ 0.8        1.        
+ 0.9        1.        
+ 1.         1.        
+"r1 (2 0) 1 "
+".tran "
+#Time       v(1)      
+ 0.         0.        
+ 0.1        1.        
+ 0.2        1.        
+ 0.3        1.        
+ 0.4        1.        
+ 0.5        1.        
+ 0.6        1.        
+ 0.7        1.        
+ 0.8        1.        
+ 0.9        1.        
+ 1.         1.        
+".end "
diff --git a/tests/s_tr.2.gc b/tests/s_tr.2.gc
new file mode 100644
index 0000000..2e9672d
--- /dev/null
+++ b/tests/s_tr.2.gc
@@ -0,0 +1,8 @@
+spice
+.option list
+v1 (1 0) pulse (0 1)
+.print tran v(1)
+.tran 0 1 .1
+r1 (2 0) 1
+.tran trace all
+.end
diff --git a/tests/s_tr.3.gc b/tests/s_tr.3.gc
new file mode 100644
index 0000000..6a01802
--- /dev/null
+++ b/tests/s_tr.3.gc
@@ -0,0 +1,9 @@
+spice
+.option list
+v1 (1 0) pulse (0 1)
+r1 (2 0) 1
+.print tran v(1)
+.tran 0 1 .1
+.del r1
+.tran
+.end
diff --git a/tests/s_tr.4.gc b/tests/s_tr.4.gc
new file mode 100644
index 0000000..36b706a
--- /dev/null
+++ b/tests/s_tr.4.gc
@@ -0,0 +1,8 @@
+spice
+.option list
+v1 (1 0) pulse (0 1)
+r1 (2 0) 1
+.print tran v(1)
+.tran 0 1 .1
+.tran
+.end
diff --git a/tests/s_tr.5.gc b/tests/s_tr.5.gc
new file mode 100644
index 0000000..e42877d
--- /dev/null
+++ b/tests/s_tr.5.gc
@@ -0,0 +1,8 @@
+spice
+.option list
+v1 (1 0) pulse (0 1)
+.print tran v(1)
+.tran 0 1 .1
+r1 (2 0) 1
+.tran
+.end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-electronics/gnucap.git



More information about the Pkg-electronics-commits mailing list