diff libinterp/corefcn/dassl.cc @ 29961:7d6709900da7

eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more Files affected: __betainc__.cc, __contourc__.cc, __eigs__.cc, __expint__.cc, __ftp__.cc, __gammainc__.cc, __ichol__.cc, __ilu__.cc, __magick_read__.cc, __pchip_deriv__.cc, __qp__.cc, amd.cc, balance.cc, besselj.cc, bsxfun.cc, call-stack.cc, ccolamd.cc, cellfun.cc, chol.cc, colamd.cc, colloc.cc, conv2.cc, daspk.cc, dasrt.cc, dassl.cc, data.cc, defaults.cc, dirfns.cc, display.cc, dlmread.cc, dmperm.cc, dot.cc, eig.cc, ellipj.cc, environment.cc, error.cc, event-manager.cc, fft.cc, fft2.cc, fftn.cc, file-io.cc, find.cc, gcd.cc, getgrent.cc, getpwent.cc, getrusage.cc, gsvd.cc, hash.cc, help.cc, hess.cc, hex2num.cc, input.cc, inv.cc, jsondecode.cc, jsonencode.cc, load-path.cc, load-save.cc, lookup.cc, lsode.cc, lu.cc, max.cc, mgorth.cc, oct-hist.cc, ordqz.cc, ordschur.cc, pager.cc, pr-output.cc, psi.cc, qr.cc, quad.cc, quadcc.cc, qz.cc, rand.cc, regexp.cc, schur.cc, settings.cc, sighandlers.cc, sparse.cc, spparms.cc, sqrtm.cc, stream-euler.cc, strfind.cc, strfns.cc, sub2ind.cc, svd.cc, symbfact.cc, symtab.cc, syscalls.cc, sysdep.cc, time.cc, toplev.cc, tril.cc, typecast.cc, urlwrite.cc, utils.cc, variables.cc, __delaunayn__.cc, __fltk_uigetfile__.cc, __glpk__.cc, __init_gnuplot__.cc, __ode15__.cc, __voronoi__.cc, audiodevinfo.cc, audioread.cc, convhulln.cc, fftw.cc, gzip.cc, ov-cell.cc, ov-class.cc, ov-classdef.cc, ov-fcn-handle.cc, ov-struct.cc, ov-typeinfo.cc, ov-usr-fcn.cc, octave.cc, lex.ll, oct-parse.yy, profiler.cc, andpt-eval.cc.
author John W. Eaton <jwe@octave.org>
date Sat, 14 Aug 2021 22:48:52 -0400
parents 32c3a5805893
children 796f54d4ddbf
line wrap: on
line diff
--- a/libinterp/corefcn/dassl.cc	Sat Aug 14 21:50:26 2021 -0400
+++ b/libinterp/corefcn/dassl.cc	Sat Aug 14 22:48:52 2021 -0400
@@ -46,6 +46,8 @@
 
 #include "DASSL-opts.cc"
 
+OCTAVE_NAMESPACE_BEGIN
+
 // Global pointer for user defined function required by dassl.
 static octave_value dassl_fcn;
 
@@ -59,7 +61,7 @@
 // Is this a recursive call?
 static int call_depth = 0;
 
-ColumnVector
+static ColumnVector
 dassl_user_function (const ColumnVector& x, const ColumnVector& xdot,
                      double t, octave_idx_type& ires)
 {
@@ -79,9 +81,9 @@
 
       try
         {
-          tmp = octave::feval (dassl_fcn, args, 1);
+          tmp = feval (dassl_fcn, args, 1);
         }
-      catch (octave::execution_exception& ee)
+      catch (execution_exception& ee)
         {
           err_user_supplied_eval (ee, "dassl");
         }
@@ -108,7 +110,7 @@
   return retval;
 }
 
-Matrix
+static Matrix
 dassl_user_jacobian (const ColumnVector& x, const ColumnVector& xdot,
                      double t, double cj)
 {
@@ -129,9 +131,9 @@
 
       try
         {
-          tmp = octave::feval (dassl_jac, args, 1);
+          tmp = feval (dassl_jac, args, 1);
         }
-      catch (octave::execution_exception& ee)
+      catch (execution_exception& ee)
         {
           err_user_supplied_eval (ee, "dassl");
         }
@@ -155,8 +157,6 @@
   return retval;
 }
 
-OCTAVE_NAMESPACE_BEGIN
-
 DEFMETHOD (dassl, interp, args, nargout,
            doc: /* -*- texinfo -*-
 @deftypefn {} {[@var{x}, @var{xdot}, @var{istate}, @var{msg}] =} dassl (@var{fcn}, @var{x_0}, @var{xdot_0}, @var{t}, @var{t_crit})
@@ -271,7 +271,7 @@
 
   octave_value_list retval (4);
 
-  octave::unwind_protect_var<int> restore_var (call_depth);
+  unwind_protect_var<int> restore_var (call_depth);
   call_depth++;
 
   if (call_depth > 1)
@@ -294,13 +294,11 @@
         f_arg = c(0);
       else if (c.numel () == 2)
         {
-          dassl_fcn = octave::get_function_handle (interp, c(0),
-                                                   fcn_param_names);
+          dassl_fcn = get_function_handle (interp, c(0), fcn_param_names);
 
           if (dassl_fcn.is_defined ())
             {
-              dassl_jac = octave::get_function_handle (interp, c(1),
-                                                       jac_param_names);
+              dassl_jac = get_function_handle (interp, c(1), jac_param_names);
 
               if (dassl_jac.is_undefined ())
                 dassl_fcn = octave_value ();
@@ -319,21 +317,20 @@
           switch (f_arg.rows ())
             {
             case 1:
-              dassl_fcn = octave::get_function_handle (interp, f_arg,
-                                                       fcn_param_names);
+              dassl_fcn = get_function_handle (interp, f_arg, fcn_param_names);
               break;
 
             case 2:
               {
                 string_vector tmp = f_arg.string_vector_value ();
 
-                dassl_fcn = octave::get_function_handle (interp, tmp(0),
-                                                         fcn_param_names);
+                dassl_fcn = get_function_handle (interp, tmp(0),
+                                                 fcn_param_names);
 
                 if (dassl_fcn.is_defined ())
                   {
-                    dassl_jac = octave::get_function_handle (interp, tmp(1),
-                                                             jac_param_names);
+                    dassl_jac = get_function_handle (interp, tmp(1),
+                                                     jac_param_names);
 
                     if (dassl_jac.is_undefined ())
                       dassl_fcn = octave_value ();