# HG changeset patch # User Jaroslav Hajek # Date 1237664781 -3600 # Node ID 0631d397fbe08a9ce3c08c7afa9cb2c61f04e45a # Parent 5cc15e4b4e5c499672c66697d04eb766b98cfb62 replace lo_ieee_isnan by xisnan, add missing includes diff -r 5cc15e4b4e5c -r 0631d397fbe0 liboctave/Array-d.cc --- a/liboctave/Array-d.cc Sat Mar 21 13:04:43 2009 -0400 +++ b/liboctave/Array-d.cc Sat Mar 21 20:46:21 2009 +0100 @@ -27,7 +27,7 @@ // Instantiate Arrays of double values. -#include "lo-ieee.h" +#include "lo-mappers.h" #include "Array.h" #include "Array.cc" #include "oct-locbuf.h" @@ -40,19 +40,19 @@ inline bool sort_isnan (double x) { - return lo_ieee_isnan (x); + return xisnan (x); } static bool nan_ascending_compare (double x, double y) { - return lo_ieee_isnan (y) ? ! lo_ieee_isnan (x) : x < y; + return xisnan (y) ? ! xisnan (x) : x < y; } static bool nan_descending_compare (double x, double y) { - return lo_ieee_isnan (x) ? ! lo_ieee_isnan (y) : x > y; + return xisnan (x) ? ! xisnan (y) : x > y; } Array::compare_fcn_type diff -r 5cc15e4b4e5c -r 0631d397fbe0 liboctave/Array-f.cc --- a/liboctave/Array-f.cc Sat Mar 21 13:04:43 2009 -0400 +++ b/liboctave/Array-f.cc Sat Mar 21 20:46:21 2009 +0100 @@ -27,7 +27,7 @@ // Instantiate Arrays of float values. -#include "lo-ieee.h" +#include "lo-mappers.h" #include "Array.h" #include "Array.cc" #include "oct-locbuf.h" @@ -40,19 +40,19 @@ inline bool sort_isnan (float x) { - return lo_ieee_isnan (x); + return xisnan (x); } static bool nan_ascending_compare (float x, float y) { - return lo_ieee_isnan (y) ? ! lo_ieee_isnan (x) : x < y; + return xisnan (y) ? ! xisnan (x) : x < y; } static bool nan_descending_compare (float x, float y) { - return lo_ieee_isnan (x) ? ! lo_ieee_isnan (y) : x > y; + return xisnan (x) ? ! xisnan (y) : x > y; } Array::compare_fcn_type diff -r 5cc15e4b4e5c -r 0631d397fbe0 liboctave/CDiagMatrix.cc --- a/liboctave/CDiagMatrix.cc Sat Mar 21 13:04:43 2009 -0400 +++ b/liboctave/CDiagMatrix.cc Sat Mar 21 20:46:21 2009 +0100 @@ -30,6 +30,7 @@ #include "Array-util.h" #include "lo-error.h" +#include "lo-ieee.h" #include "mx-base.h" #include "mx-inlines.cc" #include "oct-cmplx.h" diff -r 5cc15e4b4e5c -r 0631d397fbe0 liboctave/ChangeLog --- a/liboctave/ChangeLog Sat Mar 21 13:04:43 2009 -0400 +++ b/liboctave/ChangeLog Sat Mar 21 20:46:21 2009 +0100 @@ -1,3 +1,12 @@ +2009-03-21 Jaroslav Hajek + + * Array-d.cc: lo_ieee_isnan -> xisnan. + * Array-f.cc: Ditto. + * oct-inttypes.cc: Ditto. + * oct-inttypes.h: Ditto. + * CDiagMatrix.cc: Add missing include. + * fCDiagMatrix.cc: Ditto. + 2009-03-20 Jaroslav Hajek diff -r 5cc15e4b4e5c -r 0631d397fbe0 liboctave/fCDiagMatrix.cc --- a/liboctave/fCDiagMatrix.cc Sat Mar 21 13:04:43 2009 -0400 +++ b/liboctave/fCDiagMatrix.cc Sat Mar 21 20:46:21 2009 +0100 @@ -30,6 +30,7 @@ #include "Array-util.h" #include "lo-error.h" +#include "lo-ieee.h" #include "mx-base.h" #include "mx-inlines.cc" #include "oct-cmplx.h" diff -r 5cc15e4b4e5c -r 0631d397fbe0 liboctave/oct-inttypes.cc --- a/liboctave/oct-inttypes.cc Sat Mar 21 13:04:43 2009 -0400 +++ b/liboctave/oct-inttypes.cc Sat Mar 21 20:46:21 2009 +0100 @@ -407,7 +407,7 @@ { return x / octave_uint64 (static_cast (2)); } - else if (y < 0 || lo_ieee_isnan (x) || lo_ieee_isinf (x)) + else if (y < 0 || xisnan (x) || xisinf (x)) { return octave_uint64 (x.value () * y); } @@ -442,7 +442,7 @@ { return x / octave_int64 (static_cast (4*y)); } - else if (lo_ieee_isnan (x) || lo_ieee_isinf (x)) + else if (xisnan (x) || xisinf (x)) { return octave_int64 (x.value () * y); } diff -r 5cc15e4b4e5c -r 0631d397fbe0 liboctave/oct-inttypes.h --- a/liboctave/oct-inttypes.h Sat Mar 21 13:04:43 2009 -0400 +++ b/liboctave/oct-inttypes.h Sat Mar 21 20:46:21 2009 +0100 @@ -33,11 +33,11 @@ #include "lo-traits.h" #include "lo-math.h" #include "oct-types.h" -#include "lo-ieee.h" #include "lo-mappers.h" #ifdef OCTAVE_INT_USE_LONG_DOUBLE inline long double xround (long double x) { return roundl (x); } +inline long double xisnan (long double x) { return xisnan (static_cast (x)); } #endif // Undefine min/max if needed (this may happen under Windows) @@ -289,7 +289,7 @@ // Compute proper thresholds. static const S thmin = compute_threshold (static_cast (min_val ()), min_val ()); static const S thmax = compute_threshold (static_cast (max_val ()), max_val ()); - if (lo_ieee_isnan (value)) + if (xisnan (value)) { fnan = true; return static_cast (0); diff -r 5cc15e4b4e5c -r 0631d397fbe0 src/ChangeLog --- a/src/ChangeLog Sat Mar 21 13:04:43 2009 -0400 +++ b/src/ChangeLog Sat Mar 21 20:46:21 2009 +0100 @@ -1,3 +1,11 @@ +2009-03-21 Jaroslav Hajek + + * ov-base-diag.cc: Add missing include. + * sparse-xdiv.cc: Ditto. + * DLD-FUNCTIONS/__glpk__.cc: Ditto. + * DLD-FUNCTIONS/__lin_interpn__.cc: Ditto. + * DLD-FUNCTIONS/__voronoi__.cc: Ditto. + 2009-03-20 Jaroslav Hajek * ov-re-mat.cc (octave_matrix::load_ascii): Simplify. diff -r 5cc15e4b4e5c -r 0631d397fbe0 src/DLD-FUNCTIONS/__glpk__.cc --- a/src/DLD-FUNCTIONS/__glpk__.cc Sat Mar 21 13:04:43 2009 -0400 +++ b/src/DLD-FUNCTIONS/__glpk__.cc Sat Mar 21 20:46:21 2009 +0100 @@ -28,6 +28,8 @@ #include #include +#include "lo-ieee.h" + #include "defun-dld.h" #include "error.h" #include "gripes.h" diff -r 5cc15e4b4e5c -r 0631d397fbe0 src/DLD-FUNCTIONS/__lin_interpn__.cc --- a/src/DLD-FUNCTIONS/__lin_interpn__.cc Sat Mar 21 13:04:43 2009 -0400 +++ b/src/DLD-FUNCTIONS/__lin_interpn__.cc Sat Mar 21 20:46:21 2009 +0100 @@ -24,6 +24,7 @@ #include #endif +#include "lo-ieee.h" #include "dNDArray.h" #include "oct-locbuf.h" diff -r 5cc15e4b4e5c -r 0631d397fbe0 src/DLD-FUNCTIONS/__voronoi__.cc --- a/src/DLD-FUNCTIONS/__voronoi__.cc Sat Mar 21 13:04:43 2009 -0400 +++ b/src/DLD-FUNCTIONS/__voronoi__.cc Sat Mar 21 20:46:21 2009 +0100 @@ -34,6 +34,7 @@ #ifdef HAVE_CONFIG_H #include #endif +#include "lo-ieee.h" #include "oct.h" #include "Cell.h" diff -r 5cc15e4b4e5c -r 0631d397fbe0 src/ov-base-diag.cc --- a/src/ov-base-diag.cc Sat Mar 21 13:04:43 2009 -0400 +++ b/src/ov-base-diag.cc Sat Mar 21 20:46:21 2009 +0100 @@ -27,6 +27,7 @@ #include #include "mach-info.h" +#include "lo-ieee.h" #include "ov-base.h" #include "ov-base-mat.h" diff -r 5cc15e4b4e5c -r 0631d397fbe0 src/sparse-xdiv.cc --- a/src/sparse-xdiv.cc Sat Mar 21 13:04:43 2009 -0400 +++ b/src/sparse-xdiv.cc Sat Mar 21 20:46:21 2009 +0100 @@ -31,6 +31,7 @@ #include "oct-cmplx.h" #include "quit.h" #include "error.h" +#include "lo-ieee.h" #include "dSparse.h" #include "dDiagMatrix.h"