lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 7ae73fae 7/8: Localize an 'f2c' global


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 7ae73fae 7/8: Localize an 'f2c' global
Date: Mon, 6 Jun 2022 18:40:33 -0400 (EDT)

branch: master
commit 7ae73fae69f9c9c8cafc2b9d54f3a850fda97f0c
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Localize an 'f2c' global
    
    See:
      https://lists.nongnu.org/archive/html/lmi/2022-06/msg00021.html
    starting on the line that contains 'f2c'.
---
 zero.hpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/zero.hpp b/zero.hpp
index 6f1c481f..894719e5 100644
--- a/zero.hpp
+++ b/zero.hpp
@@ -1153,11 +1153,6 @@ double brent_zero_reference
 // to 'driver.c'. The code here is a combination of 'driver.c'
 // and 'enclofx.c', edited extensively to make it work with lmi.
 
-/* Table of constant values */
-
-static int c2 = 2;
-static int c3 = 3;
-
 int tole_(double* b, double* tol, int* neps, double* eps);
 int func_(int* /* nprob */, double* x, double* fx);
 template<typename FunctionalType>
@@ -1227,6 +1222,11 @@ template<typename FunctionalType>
 int rroot_(FunctionalType& f, int* nprob, int* neps, double* eps,
         double* a, double* b, double* root, int* n_eval)
 {
+    /* Table of constant values */
+
+    static int c2 = 2;
+    static int c3 = 3;
+
     /* System generated locals */
     double d_1;
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]