diff libinterp/dldfcn/colamd.cc @ 21109:bd1752782e56

Use err_disabled_feature, warn_disabled_feature throughout code base. In liboctave, use the same error text as err_disabled_feature, but call error_handler directly because err_disabled_feature is in libinterp. * errwarn.cc (err_disabled_feature): Don't print leading "%s:" if calling function is "". * errwarn.cc (warn_disabled_feature): New function. Same msg as err_disabled_feature but uses warning rather than error. * errwarn.h (warn_disabled_feature): prototype for new function. * file-io.cc, gl-render.cc, gl2ps-renderer.cc, load-save.cc, ls-mat5.cc, oct-hdf5-types.cc, pt-jit.cc, syscalls.cc, sysdep.cc, toplev.cc, __delaunayn__.cc, __eigs__.cc, __fltk_uigetfile__.cc, __init_fltk__.cc, __osmesa_print__.cc, __voronoi__.cc, amd.cc, ccolamd.cc, colamd.cc, convhulln.cc, dmperm.cc, fftw.cc, symbfact.cc: Replace calls to error about missing feature with calls to err_disabled_feature. Replace calls to warning about missing feature with calls to warn_disabled_feature. * CSparse.cc, dSparse.cc, SparseCmplxLU.cc, SparseCmplxQR.cc, SparseQR.cc, SparsedbleLU.cc, sparse-base-chol.cc, sparse-dmsolve.cc, oct-shlib.cc: Use same text of message from err_disabled_feature but call (*current_liboctave_error_handler) or (*current_liboctave_warning_with_id_handler).
author Rik <rik@octave.org>
date Tue, 19 Jan 2016 12:44:54 -0800
parents 77f5591878bf
children 3d0d84305600
line wrap: on
line diff
--- a/libinterp/dldfcn/colamd.cc	Tue Jan 19 14:38:35 2016 -0500
+++ b/libinterp/dldfcn/colamd.cc	Tue Jan 19 12:44:54 2016 -0800
@@ -45,11 +45,11 @@
 #include "oct-locbuf.h"
 
 #ifdef USE_64_BIT_IDX_T
-#define COLAMD_NAME(name) colamd_l ## name
-#define SYMAMD_NAME(name) symamd_l ## name
+# define COLAMD_NAME(name) colamd_l ## name
+# define SYMAMD_NAME(name) symamd_l ## name
 #else
-#define COLAMD_NAME(name) colamd ## name
-#define SYMAMD_NAME(name) symamd ## name
+# define COLAMD_NAME(name) colamd ## name
+# define SYMAMD_NAME(name) symamd ## name
 #endif
 
 // The symmetric column elimination tree code take from the Davis LDL code.
@@ -441,9 +441,7 @@
   return retval;
 
 #else
-
-  error ("colamd: not available in this version of Octave");
-
+  err_disabled_feature ("colamd", "COLAMD");
 #endif
 }
 
@@ -631,9 +629,7 @@
   return retval;
 
 #else
-
-  error ("symamd: not available in this version of Octave");
-
+  err_disabled_feature ("symamd", "COLAMD");
 #endif
 }