Mercurial > hg > octave-lojdl
changeset 7231:2eb392d058bb
[project @ 2007-11-30 18:53:29 by jwe]
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-11-30 Moritz Borgmann <octave@moriborg.de> + + * configure.in: Also check for sunmath.h. + 2007-11-26 David Bateman <dbateman@free.fr> * PROJECTS: condest now implemented.
--- a/configure.in +++ b/configure.in @@ -29,7 +29,7 @@ EXTERN_CXXFLAGS="$CXXFLAGS" AC_INIT -AC_REVISION($Revision: 1.596 $) +AC_REVISION($Revision: 1.597 $) AC_PREREQ(2.57) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -1233,7 +1233,7 @@ AC_CHECK_HEADERS(assert.h curses.h direct.h dlfcn.h fcntl.h float.h \ floatingpoint.h grp.h ieeefp.h inttypes.h limits.h locale.h memory.h nan.h \ - ncurses.h poll.h pwd.h stdint.h stdlib.h string.h sys/ioctl.h \ + ncurses.h poll.h pwd.h stdint.h stdlib.h string.h sunmath.h sys/ioctl.h \ sys/param.h sys/poll.h sys/resource.h sys/select.h sys/stat.h \ sys/time.h sys/times.h sys/types.h sys/utsname.h sys/utime.h termcap.h \ unistd.h utime.h varargs.h)
--- a/doc/interpreter/contributors.in +++ b/doc/interpreter/contributors.in @@ -12,6 +12,7 @@ David Billinghurst Don Bindner Jakub Bogusz +Moritz Borgmann Marcus Brinkmann Remy Bruno Marco Caliari
--- a/liboctave/Array2.h +++ b/liboctave/Array2.h @@ -27,11 +27,11 @@ #include <cassert> #include <climits> -#include <cmath> #include <cstdlib> #include "Array.h" #include "lo-error.h" +#include "lo-math.h" class idx_vector;
--- a/liboctave/ArrayN.h +++ b/liboctave/ArrayN.h @@ -29,12 +29,12 @@ #include <cassert> #include <climits> -#include <cmath> #include <cstdlib> #include "Array.h" #include "Array2.h" #include "lo-error.h" +#include "lo-math.h" class idx_vector;
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,19 @@ +2007-11-30 John W. Eaton <jwe@octave.org> + + * lo-math.h: New file. + * Makefile.in (INCLUDES): Add it to the list. + * liboctave/Array2.h, liboctave/ArrayN.h, liboctave/CmplxDET.cc, + liboctave/DASPK.cc, liboctave/DASPK.h, liboctave/DASRT.cc, + liboctave/DASRT.h, liboctave/DASSL.cc, liboctave/DASSL.h, + liboctave/LSODE.cc, liboctave/LSODE.h, liboctave/NLEqn.h, + liboctave/Quad.h, liboctave/Range.cc, liboctave/dbleDET.cc, + liboctave/lo-cieee.c, liboctave/lo-ieee.cc, + liboctave/lo-mappers.cc, liboctave/oct-time.cc, + liboctave/oct-time.h, liboctave/randgamma.c, + liboctave/randmtzig.c, liboctave/randpoisson.c: Include lo-math.h + instead of cmath or math.h. + * lo-mappers.h: Don't include sunmath.h here. + 2007-11-26 John W. Eaton <jwe@octave.org> * idx-vector.h (idx_vector::idx_vector_rep (const intNDArray<U>&)):
--- a/liboctave/CmplxDET.cc +++ b/liboctave/CmplxDET.cc @@ -27,10 +27,10 @@ #include <cassert> #include <cfloat> -#include <cmath> #include "CmplxDET.h" #include "lo-mappers.h" +#include "lo-math.h" #include "oct-cmplx.h" bool
--- a/liboctave/DASPK.cc +++ b/liboctave/DASPK.cc @@ -26,13 +26,13 @@ #endif #include <cfloat> -#include <cmath> #include <sstream> #include "DASPK.h" #include "f77-fcn.h" #include "lo-error.h" +#include "lo-math.h" #include "quit.h" typedef octave_idx_type (*daspk_fcn_ptr) (const double&, const double*,
--- a/liboctave/DASPK.h +++ b/liboctave/DASPK.h @@ -25,9 +25,9 @@ #define octave_DASPK_h 1 #include <cfloat> -#include <cmath> #include "DASPK-opts.h" +#include "lo-math.h" class OCTAVE_API
--- a/liboctave/DASRT.cc +++ b/liboctave/DASRT.cc @@ -25,13 +25,13 @@ #endif #include <cfloat> -#include <cmath> #include <sstream> #include "DASRT.h" #include "f77-fcn.h" #include "lo-error.h" +#include "lo-math.h" #include "quit.h" typedef octave_idx_type (*dasrt_fcn_ptr) (const double&, const double*, const double*,
--- a/liboctave/DASRT.h +++ b/liboctave/DASRT.h @@ -24,9 +24,9 @@ #define octave_DASRT_h 1 #include <cfloat> -#include <cmath> #include "DASRT-opts.h" +#include "lo-math.h" class DASRT_result
--- a/liboctave/DASSL.cc +++ b/liboctave/DASSL.cc @@ -26,13 +26,13 @@ #endif #include <cfloat> -#include <cmath> #include <sstream> #include "DASSL.h" #include "f77-fcn.h" #include "lo-error.h" +#include "lo-math.h" #include "quit.h" typedef octave_idx_type (*dassl_fcn_ptr) (const double&, const double*, const double*,
--- a/liboctave/DASSL.h +++ b/liboctave/DASSL.h @@ -25,9 +25,9 @@ #define octave_DASSL_h 1 #include <cfloat> -#include <cmath> #include "DASSL-opts.h" +#include "lo-math.h" class OCTAVE_API
--- a/liboctave/LSODE.cc +++ b/liboctave/LSODE.cc @@ -26,13 +26,13 @@ #endif #include <cfloat> -#include <cmath> #include <sstream> #include "LSODE.h" #include "f77-fcn.h" #include "lo-error.h" +#include "lo-math.h" #include "quit.h" typedef octave_idx_type (*lsode_fcn_ptr) (const octave_idx_type&, const double&, double*,
--- a/liboctave/LSODE.h +++ b/liboctave/LSODE.h @@ -25,9 +25,9 @@ #define octave_LSODE_h 1 #include <cfloat> -#include <cmath> #include "LSODE-opts.h" +#include "lo-math.h" class OCTAVE_API
--- a/liboctave/Makefile.in +++ b/liboctave/Makefile.in @@ -79,7 +79,7 @@ base-de.h base-min.h byte-swap.h cmd-edit.h cmd-hist.h \ data-conv.h dir-ops.h file-ops.h file-stat.h getopt.h \ glob-match.h idx-vector.h kpse-xfns.h \ - lo-ieee.h lo-mappers.h lo-specfun.h \ + lo-ieee.h lo-mappers.h lo-math.h lo-specfun.h \ lo-sysdep.h lo-utils.h mach-info.h md5.h oct-alloc.h oct-cmplx.h \ oct-env.h oct-fftw.h oct-getopt.h oct-group.h oct-inttypes.h \ oct-md5.h oct-passwd.h oct-rand.h oct-rl-edit.h oct-rl-hist.h \
--- a/liboctave/NLEqn.h +++ b/liboctave/NLEqn.h @@ -25,9 +25,9 @@ #define octave_NLEqn_h 1 #include <cfloat> -#include <cmath> #include "NLEqn-opts.h" +#include "lo-math.h" class OCTAVE_API
--- a/liboctave/Quad.h +++ b/liboctave/Quad.h @@ -25,9 +25,9 @@ #define octave_Quad_h 1 #include <cfloat> -#include <cmath> #include "dColVector.h" +#include "lo-math.h" #if !defined (octave_Quad_typedefs) #define octave_Quad_typedefs 1
--- a/liboctave/Range.cc +++ b/liboctave/Range.cc @@ -26,13 +26,13 @@ #endif #include <cfloat> -#include <cmath> #include <iostream> #include <limits> #include "Range.h" #include "lo-mappers.h" +#include "lo-math.h" #include "lo-utils.h" bool
--- a/liboctave/dbleDET.cc +++ b/liboctave/dbleDET.cc @@ -26,10 +26,10 @@ #endif #include <cfloat> -#include <cmath> #include "dbleDET.h" #include "lo-mappers.h" +#include "lo-math.h" bool DET::value_will_overflow (void) const
--- a/liboctave/lo-cieee.c +++ b/liboctave/lo-cieee.c @@ -25,7 +25,6 @@ #endif #include <float.h> -#include <math.h> #if defined (HAVE_FLOATINGPOINT_H) #include <floatingpoint.h> @@ -46,6 +45,7 @@ #endif #include "lo-ieee.h" +#include "lo-math.h" #if ! defined (HAVE_ISNAN) && defined (HAVE__ISNAN) #define isnan _isnan
--- a/liboctave/lo-ieee.cc +++ b/liboctave/lo-ieee.cc @@ -26,7 +26,6 @@ #endif #include <cfloat> -#include <cmath> #if defined (HAVE_FLOATINGPOINT_H) #include <floatingpoint.h> @@ -48,6 +47,7 @@ #include "lo-error.h" #include "lo-ieee.h" +#include "lo-math.h" #include "mach-info.h" void
--- a/liboctave/lo-mappers.cc +++ b/liboctave/lo-mappers.cc @@ -26,15 +26,11 @@ #endif #include <cfloat> -#include <cmath> - -#if defined (HAVE_SUNMATH_H) -#include <sunmath.h> -#endif #include "lo-error.h" #include "lo-ieee.h" #include "lo-mappers.h" +#include "lo-math.h" #include "lo-specfun.h" #include "lo-utils.h" #include "oct-cmplx.h"
--- a/liboctave/oct-time.cc +++ b/liboctave/oct-time.cc @@ -25,7 +25,6 @@ #endif #include <climits> -#include <cmath> #include <ctime> #ifdef HAVE_UNISTD_H @@ -42,6 +41,7 @@ #endif #include "lo-error.h" +#include "lo-math.h" #include "lo-utils.h" #include "oct-time.h"
--- a/liboctave/oct-time.h +++ b/liboctave/oct-time.h @@ -23,10 +23,9 @@ #if !defined (octave_time_h) #define octave_time_h 1 -#include <cmath> - #include <string> +#include "lo-math.h" #include "systime.h" class octave_base_tm;
--- a/liboctave/randgamma.c +++ b/liboctave/randgamma.c @@ -81,10 +81,10 @@ #include <config.h> #endif -#include <math.h> #include <stdio.h> #include "lo-ieee.h" +#include "lo-math.h" #include "randmtzig.h" #include "randgamma.h"
--- a/liboctave/randmtzig.c +++ b/liboctave/randmtzig.c @@ -147,7 +147,6 @@ #include <config.h> #endif -#include <math.h> #include <stdio.h> #include <time.h> @@ -155,6 +154,7 @@ #include <sys/time.h> #endif +#include "lo-math.h" #include "randmtzig.h" /* FIXME may want to suppress X86 if sizeof(long)>4 */
--- a/liboctave/randpoisson.c +++ b/liboctave/randpoisson.c @@ -35,12 +35,12 @@ #include <config.h> #endif -#include <math.h> #include <stdio.h> #include "f77-fcn.h" +#include "lo-error.h" #include "lo-ieee.h" -#include "lo-error.h" +#include "lo-math.h" #include "randmtzig.h" #include "randpoisson.h" @@ -73,8 +73,6 @@ /* ---- pprsc.c from Stadloeber's winrand --- */ -#include <math.h> - /* flogfak(k) = ln(k!) */ static double flogfak (double k)
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2007-11-30 John W. Eaton <jwe@octave.org> + * src/data.cc, src/matherr.c, src/pr-output.cc, src/sysdep.cc, + src/DLD-FUNCTIONS/__dsearchn__.cc, src/DLD-FUNCTIONS/minmax.cc, + src/DLD-FUNCTIONS/qz.cc, src/DLD-FUNCTIONS/sort.cc, + src/DLD-FUNCTIONS/tsearch.cc: Include lo-math.h instead of cmath + or math.h. + * DLD-FUNCTIONS/sort.cc (ascending_compare, descending_compare, operator < (const Complex&, const Complex&)): Pass args by const reference, not value.
--- a/src/DLD-FUNCTIONS/__dsearchn__.cc +++ b/src/DLD-FUNCTIONS/__dsearchn__.cc @@ -22,13 +22,14 @@ #include <iostream> #include <fstream> -#include <cmath> #include <string> #ifdef HAVE_CONFIG_H #include <config.h> #endif +#include "lo-math.h" +//FIXME -- Octave sources should use individual include files, not oct.h. #include "oct.h" DEFUN_DLD (__dsearchn__, args, ,
--- a/src/DLD-FUNCTIONS/minmax.cc +++ b/src/DLD-FUNCTIONS/minmax.cc @@ -25,10 +25,9 @@ #include <config.h> #endif -#include <cmath> - #include "lo-ieee.h" #include "lo-mappers.h" +#include "lo-math.h" #include "dNDArray.h" #include "CNDArray.h" #include "quit.h"
--- a/src/DLD-FUNCTIONS/qz.cc +++ b/src/DLD-FUNCTIONS/qz.cc @@ -32,7 +32,6 @@ #include "config.h" #include <cfloat> -#include <cmath> #include <iostream> #include <iomanip> @@ -40,6 +39,7 @@ #include "CmplxQRP.h" #include "dbleQR.h" #include "f77-fcn.h" +#include "lo-math.h" #include "quit.h" #include "defun-dld.h"
--- a/src/DLD-FUNCTIONS/tsearch.cc +++ b/src/DLD-FUNCTIONS/tsearch.cc @@ -24,12 +24,12 @@ #include <iostream> #include <fstream> -#include <cmath> #include <string> #include "oct.h" #include "parse.h" #include "lo-ieee.h" +#include "lo-math.h" inline double max(double a, double b, double c) {
--- a/src/data.cc +++ b/src/data.cc @@ -36,11 +36,11 @@ #endif #include <cfloat> -#include <cmath> #include <string> #include "lo-ieee.h" +#include "lo-math.h" #include "str-vec.h" #include "quit.h"
--- a/src/matherr.c +++ b/src/matherr.c @@ -26,7 +26,7 @@ #if defined (EXCEPTION_IN_MATH) -#include <math.h> +#include "lo-math.h" int matherr (struct exception *x)
--- a/src/pr-output.cc +++ b/src/pr-output.cc @@ -26,7 +26,6 @@ #endif #include <cfloat> -#include <cmath> #include <cstdio> #include <cstring> @@ -41,6 +40,7 @@ #include "cmd-edit.h" #include "dMatrix.h" #include "lo-mappers.h" +#include "lo-math.h" #include "mach-info.h" #include "oct-cmplx.h" #include "quit.h"
--- a/src/sysdep.cc +++ b/src/sysdep.cc @@ -26,7 +26,6 @@ #endif #include <cfloat> -#include <cmath> #include <cstddef> #include <cstdio> #include <cstdlib> @@ -73,6 +72,7 @@ #include "cmd-edit.h" #include "file-ops.h" #include "lo-mappers.h" +#include "lo-math.h" #include "mach-info.h" #include "oct-env.h" #include "quit.h"