Mercurial > jwe > octave
changeset 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).
line wrap: on
line diff
--- a/libinterp/corefcn/errwarn.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/corefcn/errwarn.cc Tue Jan 19 12:44:54 2016 -0800 @@ -48,10 +48,14 @@ void err_disabled_feature (const std::string& fcn, const std::string& feature, - const std::string& pkg /*="Octave"*/) + const std::string& pkg /* ="Octave" */) { - error ("%s: support for %s was unavailable or disabled when %s was built", - fcn.c_str (), feature.c_str (), pkg.c_str ()); + if (! fcn.empty ()) + error ("%s: support for %s was unavailable or disabled when %s was built", + fcn.c_str (), feature.c_str (), pkg.c_str ()); + else + error ("support for %s was unavailable or disabled when %s was built", + feature.c_str (), pkg.c_str ()); } void @@ -284,6 +288,18 @@ } void +warn_disabled_feature (const std::string& fcn, const std::string& feature, + const std::string& pkg /*="Octave"*/) +{ + if (! fcn.empty ()) + warning ("%s: support for %s was unavailable or disabled when %s was built", + fcn.c_str (), feature.c_str (), pkg.c_str ()); + else + warning ("support for %s was unavailable or disabled when %s was built", + feature.c_str (), pkg.c_str ()); +} + +void warn_divide_by_zero (void) { warning_with_id ("Octave:divide-by-zero", "division by zero");
--- a/libinterp/corefcn/errwarn.h Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/corefcn/errwarn.h Tue Jan 19 12:44:54 2016 -0800 @@ -43,7 +43,7 @@ OCTAVE_NORETURN OCTINTERP_API extern void err_disabled_feature (const std::string& fcn, const std::string& feature, - const std::string& pkg="Octave"); + const std::string& pkg = "Octave"); OCTAVE_NORETURN OCTINTERP_API extern void err_indexed_cs_list (void); @@ -150,6 +150,11 @@ void warn_data_file_in_path (const std::string& fcn, const std::string& file); OCTINTERP_API extern +void warn_disabled_feature (const std::string& fcn, + const std::string& feature, + const std::string& pkg = "Octave"); + +OCTINTERP_API extern void warn_divide_by_zero (void); OCTINTERP_API extern
--- a/libinterp/corefcn/file-io.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/corefcn/file-io.cc Tue Jan 19 12:44:54 2016 -0800 @@ -178,7 +178,7 @@ use_zlib = true; mode.erase (pos, 1); #else - error ("this version of Octave does not support gzipped files"); + err_disabled_feature ("", "gzipped files (zlib)"); #endif }
--- a/libinterp/corefcn/gl-render.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/corefcn/gl-render.cc Tue Jan 19 12:44:54 2016 -0800 @@ -3269,7 +3269,8 @@ return bbox; #else - warning ("opengl_renderer: cannot render text, FreeType library not available"); + warn_disabled_feature ("opengl_renderer::render_text", + "rendering text (FreeType)"); return Matrix (1, 4, 0.0); #endif }
--- a/libinterp/corefcn/gl2ps-renderer.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/corefcn/gl2ps-renderer.cc Tue Jan 19 12:44:54 2016 -0800 @@ -654,8 +654,6 @@ rend.draw (fig, cmd); #else - - error ("print: printing not available without gl2ps library"); - + err_disabled_feature ("gl2ps_print", "gl2ps"); #endif }
--- a/libinterp/corefcn/load-save.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/corefcn/load-save.cc Tue Jan 19 12:44:54 2016 -0800 @@ -695,7 +695,7 @@ #ifdef HAVE_HDF5 format = LS_HDF5; #else - error ("load: octave executable was not linked with HDF5 library"); + err_disabled_feature ("load", "HDF5"); #endif } else if (argv[i] == "-import" || argv[i] == "-i") @@ -1064,7 +1064,7 @@ #ifdef HAVE_HDF5 format = LS_HDF5; #else - error ("save: octave executable was not linked with HDF5 library"); + err_disabled_feature ("save", "HDF5"); #endif } else if (argv[i] == "-mat-binary" || argv[i] == "-mat" @@ -1096,7 +1096,7 @@ format = LS_HDF5; save_as_floats = true; #else - error ("save: octave executable was not linked with HDF5 library"); + err_disabled_feature ("save", "HDF5"); #endif } #ifdef HAVE_ZLIB
--- a/libinterp/corefcn/ls-mat5.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/corefcn/ls-mat5.cc Tue Jan 19 12:44:54 2016 -0800 @@ -595,7 +595,7 @@ return retval; #else - error ("load: zlib unavailable, cannot read compressed data element"); + err_disabled_feature ("load", "compressed data elements (zlib)"); #endif }
--- a/libinterp/corefcn/oct-hdf5-types.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/corefcn/oct-hdf5-types.cc Tue Jan 19 12:44:54 2016 -0800 @@ -50,9 +50,7 @@ ("Octave:internal", "the size of octave_hdf5_err is smaller than the size of HDF5 herr_t"); #else - warning_with_id - ("Octave:internal", - "check_hdf5_id_type called but Octave was not compiled with support for HDF5"); + warn_disabled_feature ("check_hdf5_id_type", "HDF5"); #endif checked = true;
--- a/libinterp/corefcn/pt-jit.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/corefcn/pt-jit.cc Tue Jan 19 12:44:54 2016 -0800 @@ -31,6 +31,7 @@ #include "debug.h" #include "defun.h" +#include "errwarn.h" #include "ov.h" #include "pt-all.h" #include "pt-jit.h" @@ -2532,8 +2533,8 @@ #if defined (HAVE_LLVM) return SET_INTERNAL_VARIABLE (jit_failcnt); #else - warning ("jit_failcnt: JIT compiling not available in this version of Octave"); - return octave_value (); + warn_disabled_feature ("jit_failcnt", "JIT compiling"); + return ovl (); #endif } @@ -2555,8 +2556,8 @@ #if defined (HAVE_LLVM) return SET_INTERNAL_VARIABLE (debug_jit); #else - warning ("debug_jit: JIT compiling not available in this version of Octave"); - return octave_value (); + warn_disabled_feature ("debug_jit", "JIT"); + return ovl (); #endif } @@ -2577,8 +2578,8 @@ #if defined (HAVE_LLVM) return SET_INTERNAL_VARIABLE (jit_enable); #else - warning ("jit_enable: JIT compiling not available in this version of Octave"); - return octave_value (); + warn_disabled_feature ("jit_enable", "JIT"); + return ovl (); #endif } @@ -2605,7 +2606,7 @@ return SET_INTERNAL_VARIABLE_WITH_LIMITS (jit_startcnt, 1, std::numeric_limits<int>::max ()); #else - warning ("jit_enable: JIT compiling not available in this version of Octave"); - return octave_value (); + warn_disabled_feature ("jit_enable", "JIT"); + return ovl (); #endif }
--- a/libinterp/corefcn/syscalls.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/corefcn/syscalls.cc Tue Jan 19 12:44:54 2016 -0800 @@ -1313,7 +1313,7 @@ #if defined (F_DUPFD) return const_value (args, F_DUPFD); #else - error ("F_DUPFD: not available on this system"); + err_disabled_feature ("F_DUPFD", "F_DUPFD"); #endif } @@ -1328,7 +1328,7 @@ #if defined (F_GETFD) return const_value (args, F_GETFD); #else - error ("F_GETFD: not available on this system"); + err_disabled_feature ("F_GETFD", "F_GETFD"); #endif } @@ -1343,7 +1343,7 @@ #if defined (F_GETFL) return const_value (args, F_GETFL); #else - error ("F_GETFL: not available on this system"); + err_disabled_feature ("F_GETFL", "F_GETFL"); #endif } @@ -1358,7 +1358,7 @@ #if defined (F_SETFD) return const_value (args, F_SETFD); #else - error ("F_SETFD: not available on this system"); + err_disabled_feature ("F_SETFD", "F_SETFD"); #endif } @@ -1373,7 +1373,7 @@ #if defined (F_SETFL) return const_value (args, F_SETFL); #else - error ("F_SETFL: not available on this system"); + err_disabled_feature ("F_SETFL", "F_SETFL"); #endif } @@ -1389,7 +1389,7 @@ #if defined (O_APPEND) return const_value (args, O_APPEND); #else - error ("O_APPEND: not available on this system"); + err_disabled_feature ("O_APPEND", "O_APPEND"); #endif } @@ -1404,7 +1404,7 @@ #if defined (O_ASYNC) return const_value (args, O_ASYNC); #else - error ("O_ASYNC: not available on this system"); + err_disabled_feature ("O_ASYNC", "O_ASYNC"); #endif } @@ -1420,7 +1420,7 @@ #if defined (O_CREAT) return const_value (args, O_CREAT); #else - error ("O_CREAT: not available on this system"); + err_disabled_feature ("O_CREAT", "O_CREAT"); #endif } @@ -1435,7 +1435,7 @@ #if defined (O_EXCL) return const_value (args, O_EXCL); #else - error ("O_EXCL: not available on this system"); + err_disabled_feature ("O_EXCL", "O_EXCL"); #endif } @@ -1451,7 +1451,7 @@ #if defined (O_NONBLOCK) return const_value (args, O_NONBLOCK); #else - error ("O_NONBLOCK: not available on this system"); + err_disabled_feature ("O_NONBLOCK", "O_NONBLOCK"); #endif } @@ -1466,7 +1466,7 @@ #if defined (O_RDONLY) return const_value (args, O_RDONLY); #else - error ("O_RDONLY: not available on this system"); + err_disabled_feature ("O_RDONLY", "O_RDONLY"); #endif } @@ -1482,7 +1482,7 @@ #if defined (O_RDWR) return const_value (args, O_RDWR); #else - error ("O_RDWR: not available on this system"); + err_disabled_feature ("O_RDWR", "O_RDWR"); #endif } @@ -1497,7 +1497,7 @@ #if defined (O_SYNC) return const_value (args, O_SYNC); #else - error ("O_SYNC: not available on this system"); + err_disabled_feature ("O_SYNC", "O_SYNC"); #endif } @@ -1513,7 +1513,7 @@ #if defined (O_TRUNC) return const_value (args, O_TRUNC); #else - error ("O_TRUNC: not available on this system"); + err_disabled_feature ("O_TRUNC", "O_TRUNC"); #endif } @@ -1528,7 +1528,7 @@ #if defined (O_WRONLY) return const_value (args, O_WRONLY); #else - error ("O_WRONLY: not available on this system"); + err_disabled_feature ("O_WRONLY", "O_WRONLY"); #endif }
--- a/libinterp/corefcn/sysdep.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/corefcn/sysdep.cc Tue Jan 19 12:44:54 2016 -0800 @@ -468,7 +468,7 @@ ioctl (tty_fd, TIOCSETN, &s); } #else - warning ("no support for raw mode console I/O on this system"); + warn_disabled_feature ("", "raw mode console I/O"); // Make sure the current mode doesn't toggle. on = curr_on;
--- a/libinterp/corefcn/toplev.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/corefcn/toplev.cc Tue Jan 19 12:44:54 2016 -0800 @@ -1095,7 +1095,7 @@ CloseHandle (pi.hProcess); CloseHandle (pi.hThread); #else - error ("system: asynchronous system calls are not supported"); + err_disabled_feature ("system", "asynchronous system calls"); #endif } else if (return_output)
--- a/libinterp/dldfcn/__delaunayn__.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/dldfcn/__delaunayn__.cc Tue Jan 19 12:44:54 2016 -0800 @@ -225,9 +225,7 @@ return retval; #else - - error ("__delaunayn__: not available in this version of Octave"); - + err_disabled_feature ("__delaunayn__", "Qhull"); #endif }
--- a/libinterp/dldfcn/__eigs__.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/dldfcn/__eigs__.cc Tue Jan 19 12:44:54 2016 -0800 @@ -559,6 +559,6 @@ return retval; #else - error ("eigs: not available in this version of Octave"); + err_disabled_feature ("eigs", "ARPACK"); #endif }
--- a/libinterp/dldfcn/__fltk_uigetfile__.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/dldfcn/__fltk_uigetfile__.cc Tue Jan 19 12:44:54 2016 -0800 @@ -138,11 +138,8 @@ return retval; #else - - error ("__fltk_uigetfile__: not available without OpenGL and FLTK libraries"); - + err_disabled_feature ("__fltk_uigetfile__", "OpenGL and FLTK"); #endif - } /*
--- a/libinterp/dldfcn/__init_fltk__.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/dldfcn/__init_fltk__.cc Tue Jan 19 12:44:54 2016 -0800 @@ -2350,7 +2350,7 @@ return ovl (); #else - error ("__fltk_check__: not available without OpenGL and FLTK libraries"); + err_disabled_feature ("__fltk_check__", "OpenGL and FLTK"); #endif } @@ -2382,8 +2382,9 @@ } return ovl (); + #else - error ("__init_fltk__: not available without OpenGL and FLTK libraries"); + err_disabled_feature ("__init_fltk__", "OpenGL and FLTK"); #endif }
--- a/libinterp/dldfcn/__osmesa_print__.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/dldfcn/__osmesa_print__.cc Tue Jan 19 12:44:54 2016 -0800 @@ -87,8 +87,8 @@ \n\ @end deftypefn") { -#if ! defined (HAVE_OSMESA) - err_disabled_feature ("__osmesa_print__", "offscreen rendering"); +#ifndef HAVE_OSMESA + err_disabled_feature ("__osmesa_print__", "offscreen rendering with OSMesa"); #else int nargin = args.length ();
--- a/libinterp/dldfcn/__voronoi__.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/dldfcn/__voronoi__.cc Tue Jan 19 12:44:54 2016 -0800 @@ -327,7 +327,7 @@ return retval; #else - error ("%s: not available in this version of Octave", caller.c_str ()); + err_disabled_feature (caller, "Qhull"); #endif }
--- a/libinterp/dldfcn/amd.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/dldfcn/amd.cc Tue Jan 19 12:44:54 2016 -0800 @@ -177,9 +177,7 @@ return ovl (Pout); #else - - error ("amd: not available in this version of Octave"); - + err_disabled_feature ("amd", "AMD"); #endif }
--- a/libinterp/dldfcn/ccolamd.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/dldfcn/ccolamd.cc Tue Jan 19 12:44:54 2016 -0800 @@ -44,11 +44,11 @@ #include "oct-locbuf.h" #ifdef USE_64_BIT_IDX_T -#define CCOLAMD_NAME(name) ccolamd_l ## name -#define CSYMAMD_NAME(name) csymamd_l ## name +# define CCOLAMD_NAME(name) ccolamd_l ## name +# define CSYMAMD_NAME(name) csymamd_l ## name #else -#define CCOLAMD_NAME(name) ccolamd ## name -#define CSYMAMD_NAME(name) csymamd ## name +# define CCOLAMD_NAME(name) ccolamd ## name +# define CSYMAMD_NAME(name) csymamd ## name #endif DEFUN_DLD (ccolamd, args, nargout, @@ -329,9 +329,7 @@ return retval; #else - - error ("ccolamd: not available in this version of Octave"); - + err_disabled_feature ("ccolamd", "CCOLAMD"); #endif } @@ -561,8 +559,6 @@ return retval; #else - - error ("csymamd: not available in this version of Octave"); - + err_disabled_feature ("csymamd", "CCOLAMD"); #endif }
--- 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 }
--- a/libinterp/dldfcn/convhulln.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/dldfcn/convhulln.cc Tue Jan 19 12:44:54 2016 -0800 @@ -289,7 +289,7 @@ return retval; #else - error ("convhulln: not available in this version of Octave"); + err_disabled_feature ("convhulln", "Qhull"); #endif }
--- a/libinterp/dldfcn/dmperm.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/dldfcn/dmperm.cc Tue Jan 19 12:44:54 2016 -0800 @@ -38,9 +38,9 @@ #include "SparseCmplxQR.h" #ifdef USE_64_BIT_IDX_T -#define CXSPARSE_NAME(name) cs_dl ## name +# define CXSPARSE_NAME(name) cs_dl ## name #else -#define CXSPARSE_NAME(name) cs_di ## name +# define CXSPARSE_NAME(name) cs_di ## name #endif static RowVector @@ -157,7 +157,7 @@ return ovl (dmperm_internal (false, args(0), nargout)); #else - error ("dmperm: not available in this version of Octave"); + err_disabled_feature ("dmperm", "CXSparse"); #endif } @@ -200,7 +200,7 @@ return ovl (dmperm_internal (true, args(0), nargout)); #else - error ("sprank: not available in this version of Octave"); + err_disabled_feature ("sprank", "CXSparse"); #endif }
--- a/libinterp/dldfcn/fftw.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/dldfcn/fftw.cc Tue Jan 19 12:44:54 2016 -0800 @@ -315,9 +315,7 @@ return retval; #else - err_disabled_feature ("fftw", "the FFTW3 planner"); - #endif }
--- a/libinterp/dldfcn/symbfact.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/libinterp/dldfcn/symbfact.cc Tue Jan 19 12:44:54 2016 -0800 @@ -345,6 +345,6 @@ return retval; #else - error ("symbfact: not available in this version of Octave"); + err_disabled_feature ("symbfact", "CHOLMOD"); #endif }
--- a/liboctave/array/CSparse.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/liboctave/array/CSparse.cc Tue Jan 19 12:44:54 2016 -0800 @@ -1282,11 +1282,12 @@ } } } + return retval; + #else - (*current_liboctave_error_handler) ("UMFPACK not installed"); + (*current_liboctave_error_handler) + ("support for UMFPACK was unavailable or disabled when liboctave was built"); #endif - - return retval; } ComplexMatrix @@ -5553,11 +5554,13 @@ if (err != 0) UMFPACK_ZNAME (free_numeric) (&Numeric); -#else - (*current_liboctave_error_handler) ("UMFPACK not installed"); -#endif return Numeric; + +#else + (*current_liboctave_error_handler) + ("support for UMFPACK was unavailable or disabled when liboctave was built"); +#endif } ComplexMatrix @@ -5709,7 +5712,9 @@ } #else (*current_liboctave_warning_with_id_handler) - ("Octave:missing-dependency", "CHOLMOD not installed"); + ("Octave:missing-dependency", + "support for CHOLMOD was unavailable or disabled " + "when liboctave was built"); mattype.mark_as_unsymmetric (); typ = MatrixType::Full; @@ -5791,7 +5796,9 @@ mattype.mark_as_rectangular (); #else - (*current_liboctave_error_handler) ("UMFPACK not installed"); + (*current_liboctave_error_handler) + ("support for UMFPACK was unavailable or disabled " + "when liboctave was built"); #endif } else if (typ != MatrixType::Hermitian) @@ -5966,7 +5973,9 @@ } #else (*current_liboctave_warning_with_id_handler) - ("Octave:missing-dependency", "CHOLMOD not installed"); + ("Octave:missing-dependency", + "support for CHOLMOD was unavailable or disabled " + "when liboctave was built"); mattype.mark_as_unsymmetric (); typ = MatrixType::Full; @@ -6080,7 +6089,9 @@ mattype.mark_as_rectangular (); #else - (*current_liboctave_error_handler) ("UMFPACK not installed"); + (*current_liboctave_error_handler) + ("support for UMFPACK was unavailable or disabled " + "when liboctave was built"); #endif } else if (typ != MatrixType::Hermitian) @@ -6239,7 +6250,9 @@ } #else (*current_liboctave_warning_with_id_handler) - ("Octave:missing-dependency", "CHOLMOD not installed"); + ("Octave:missing-dependency", + "support for CHOLMOD was unavailable or disabled " + "when liboctave was built"); mattype.mark_as_unsymmetric (); typ = MatrixType::Full; @@ -6300,7 +6313,9 @@ mattype.mark_as_rectangular (); #else - (*current_liboctave_error_handler) ("UMFPACK not installed"); + (*current_liboctave_error_handler) + ("support for UMFPACK was unavailable or disabled " + "when liboctave was built"); #endif } else if (typ != MatrixType::Hermitian) @@ -6475,7 +6490,9 @@ } #else (*current_liboctave_warning_with_id_handler) - ("Octave:missing-dependency", "CHOLMOD not installed"); + ("Octave:missing-dependency", + "support for CHOLMOD was unavailable or disabled " + "when liboctave was built"); mattype.mark_as_unsymmetric (); typ = MatrixType::Full; @@ -6581,7 +6598,9 @@ mattype.mark_as_rectangular (); #else - (*current_liboctave_error_handler) ("UMFPACK not installed"); + (*current_liboctave_error_handler) + ("support for UMFPACK was unavailable or disabled " + "when liboctave was built"); #endif } else if (typ != MatrixType::Hermitian)
--- a/liboctave/array/dSparse.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/liboctave/array/dSparse.cc Tue Jan 19 12:44:54 2016 -0800 @@ -1367,11 +1367,14 @@ } } } -#else - (*current_liboctave_error_handler) ("UMFPACK not installed"); -#endif return retval; + +#else + (*current_liboctave_error_handler) + ("support for UMFPACK was unavailable or disabled " + "when liboctave was built"); +#endif } Matrix @@ -5747,11 +5750,13 @@ if (err != 0) UMFPACK_DNAME (free_numeric) (&Numeric); + return Numeric; + #else - (*current_liboctave_error_handler) ("UMFPACK not installed"); + (*current_liboctave_error_handler) + ("support for UMFPACK was unavailable or disabled " + "when liboctave was built"); #endif - - return Numeric; } Matrix @@ -5904,7 +5909,9 @@ } #else (*current_liboctave_warning_with_id_handler) - ("Octave:missing-dependency", "CHOLMOD not installed"); + ("Octave:missing-dependency", + "support for CHOLMOD was unavailable or disabled " + "when liboctave was built"); mattype.mark_as_unsymmetric (); typ = MatrixType::Full; @@ -5959,7 +5966,9 @@ mattype.mark_as_rectangular (); #else - (*current_liboctave_error_handler) ("UMFPACK not installed"); + (*current_liboctave_error_handler) + ("support for UMFPACK was unavailable or disabled " + "when liboctave was built"); #endif } else if (typ != MatrixType::Hermitian) @@ -6133,7 +6142,9 @@ } #else (*current_liboctave_warning_with_id_handler) - ("Octave:missing-dependency", "CHOLMOD not installed"); + ("Octave:missing-dependency", + "support for CHOLMOD was unavailable or disabled " + "when liboctave was built"); mattype.mark_as_unsymmetric (); typ = MatrixType::Full; @@ -6219,7 +6230,9 @@ mattype.mark_as_rectangular (); #else - (*current_liboctave_error_handler) ("UMFPACK not installed"); + (*current_liboctave_error_handler) + ("support for UMFPACK was unavailable or disabled " + "when liboctave was built"); #endif } else if (typ != MatrixType::Hermitian) @@ -6378,7 +6391,9 @@ } #else (*current_liboctave_warning_with_id_handler) - ("Octave:missing-dependency", "CHOLMOD not installed"); + ("Octave:missing-dependency", + "support for CHOLMOD was unavailable or disabled " + "when liboctave was built"); mattype.mark_as_unsymmetric (); typ = MatrixType::Full; @@ -6451,7 +6466,9 @@ mattype.mark_as_rectangular (); #else - (*current_liboctave_error_handler) ("UMFPACK not installed"); + (*current_liboctave_error_handler) + ("support for UMFPACK was unavailable or disabled " + "when liboctave was built"); #endif } else if (typ != MatrixType::Hermitian) @@ -6626,7 +6643,9 @@ } #else (*current_liboctave_warning_with_id_handler) - ("Octave:missing-dependency", "CHOLMOD not installed"); + ("Octave:missing-dependency", + "support for CHOLMOD was unavailable or disabled " + "when liboctave was built"); mattype.mark_as_unsymmetric (); typ = MatrixType::Full; @@ -6721,7 +6740,9 @@ else mattype.mark_as_rectangular (); #else - (*current_liboctave_error_handler) ("UMFPACK not installed"); + (*current_liboctave_error_handler) + ("support for UMFPACK was unavailable or disabled " + "when liboctave was built"); #endif } else if (typ != MatrixType::Hermitian)
--- a/liboctave/numeric/SparseCmplxLU.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/liboctave/numeric/SparseCmplxLU.cc Tue Jan 19 12:44:54 2016 -0800 @@ -239,8 +239,10 @@ } } } + #else - (*current_liboctave_error_handler) ("UMFPACK not installed"); + (*current_liboctave_error_handler) + ("support for UMFPACK was unavailable or disabled when liboctave was built"); #endif } @@ -477,7 +479,9 @@ (*current_liboctave_error_handler) ("Option udiag of incomplete LU not implemented"); } + #else - (*current_liboctave_error_handler) ("UMFPACK not installed"); + (*current_liboctave_error_handler) + ("support for UMFPACK was unavailable or disabled when liboctave was built"); #endif }
--- a/liboctave/numeric/SparseCmplxQR.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/liboctave/numeric/SparseCmplxQR.cc Tue Jan 19 12:44:54 2016 -0800 @@ -80,9 +80,10 @@ (*current_liboctave_error_handler) ("SparseComplexQR: sparse matrix QR factorization filled"); count = 1; + #else (*current_liboctave_error_handler) - ("SparseComplexQR: sparse matrix QR factorization not implemented"); + ("SparseComplexQR: support for CXSparse was unavailable or disabled when liboctave was built"); #endif }
--- a/liboctave/numeric/SparseQR.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/liboctave/numeric/SparseQR.cc Tue Jan 19 12:44:54 2016 -0800 @@ -60,9 +60,10 @@ (*current_liboctave_error_handler) ("SparseQR: sparse matrix QR factorization filled"); count = 1; + #else (*current_liboctave_error_handler) - ("SparseQR: sparse matrix QR factorization not implemented"); + ("SparseQR: support for CXSparse was unavailable or disabled when liboctave was built"); #endif }
--- a/liboctave/numeric/SparsedbleLU.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/liboctave/numeric/SparsedbleLU.cc Tue Jan 19 12:44:54 2016 -0800 @@ -226,8 +226,10 @@ } } } + #else - (*current_liboctave_error_handler) ("UMFPACK not installed"); + (*current_liboctave_error_handler) + ("support for UMFPACK was unavailable or disabled when liboctave was built"); #endif } @@ -454,7 +456,9 @@ (*current_liboctave_error_handler) ("Option udiag of incomplete LU not implemented"); } + #else - (*current_liboctave_error_handler) ("UMFPACK not installed"); + (*current_liboctave_error_handler) + ("support for UMFPACK was unavailable or disabled when liboctave was built"); #endif }
--- a/liboctave/numeric/sparse-base-chol.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/liboctave/numeric/sparse-base-chol.cc Tue Jan 19 12:44:54 2016 -0800 @@ -213,11 +213,13 @@ CHOLMOD_NAME(print_common) (tmp, cm); END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE; } + + return info; + #else (*current_liboctave_error_handler) - ("Missing CHOLMOD. Sparse cholesky factorization disabled"); + ("support for CHOLMOD was unavailable or disabled when liboctave was built"); #endif - return info; } template <class chol_type, class chol_elt, class p_type>
--- a/liboctave/numeric/sparse-dmsolve.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/liboctave/numeric/sparse-dmsolve.cc Tue Jan 19 12:44:54 2016 -0800 @@ -482,10 +482,10 @@ CXSPARSE_DNAME (_dfree) (dm); } return retval; + #else (*current_liboctave_error_handler) - ("CXSPARSE unavailable; cannot solve minimum norm problem"); - return RT (); + ("support for CXSparse was unavailable or disabled when liboctave was built"); #endif }
--- a/liboctave/util/oct-shlib.cc Tue Jan 19 14:38:35 2016 -0500 +++ b/liboctave/util/oct-shlib.cc Tue Jan 19 12:44:54 2016 -0800 @@ -525,7 +525,6 @@ return new octave_dyld_shlib (f); #else (*current_liboctave_error_handler) - ("no API for dynamic loading is available"); - return new shlib_rep (); + ("support for dynamically loaded libraries was unavailable or disabled when liboctave was built"); #endif }