changeset 5989:f3ed506c85ad

of-ocs: Fix for Octave 8 (bug #61568). * src/of-ocs-6-error_state.patch: Add patch to fix compilation with Octave 8. * dist-files.mk: Add new file to dist.
author Markus Mützel <markus.muetzel@gmx.de>
date Sun, 28 Nov 2021 21:38:58 +0100
parents 9c2862093788
children 5732a63f3182
files dist-files.mk src/of-ocs-6-error_state.patch
diffstat 2 files changed, 41 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dist-files.mk	Sun Nov 28 20:32:24 2021 +0100
+++ b/dist-files.mk	Sun Nov 28 21:38:58 2021 +0100
@@ -524,6 +524,7 @@
   of-ocs-3-break-fixes.patch \
   of-ocs-4-pkgadd-fixes.patch \
   of-ocs-5-no-odepkg.patch \
+  of-ocs-6-error_state.patch \
   of-ocs.mk \
   of-octcdf.mk \
   of-octproj.mk \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/of-ocs-6-error_state.patch	Sun Nov 28 21:38:58 2021 +0100
@@ -0,0 +1,40 @@
+From b33b618b03579438efceeda51c2d1c6eab0ddea9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Markus=20M=C3=BCtzel?= <markus.muetzel@gmx.de>
+Date: Sun, 28 Nov 2021 21:29:13 +0100
+Subject: [PATCH] Fix compilation with Octave 8 (bug #61577).
+
+* src/Mshichmanhodgesmosfet.cc (FMshichmanhodgesmosfet): Remove usage of
+`error_state`. It was unconditionally set to 0 since about 6 years ago and
+will finally be removed in Octave 8.
+---
+ src/Mshichmanhodgesmosfet.cc | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/src/Mshichmanhodgesmosfet.cc b/src/Mshichmanhodgesmosfet.cc
+index 4b3e51a..1c0d7c6 100644
+--- a/src/Mshichmanhodgesmosfet.cc
++++ b/src/Mshichmanhodgesmosfet.cc
+@@ -342,10 +342,8 @@ the output structures.\n\
+     error("Mshichmanhodgesmosfet: double type value expected as time instant.\n");
+   }
+ 
+-  if (!error_state)
+-    {
+-      //FIXME: create enum of cases and use switch?
+-      if (eltype == "NMOS")
++  //FIXME: create enum of cases and use switch?
++  if (eltype == "NMOS")
+ 	{
+ 	  //FIXME: change parameters to a single map or Octave_map
+ 	  /* Default n-MOS parameters*/
+@@ -543,7 +541,5 @@ the output structures.\n\
+       else
+ 	error("Mshichmanhodgesmosfet: unknown element type.\n");
+ 
+-    }
+-
+   return (retval);
+ }
+-- 
+2.34.1.windows.1
+