Mercurial > hg > octave-lojdl
changeset 1966:4b8e9571bbdf
[project @ 1996-02-17 02:52:04 by jwe]
author | jwe |
---|---|
date | Sat, 17 Feb 1996 02:53:36 +0000 |
parents | 01e3ed56c415 |
children | 4cb6aaa0f2c7 |
files | src/sysdep.cc src/sysdep.h src/utils.h |
diffstat | 3 files changed, 4 insertions(+), 62 deletions(-) [+] |
line wrap: on
line diff
--- a/src/sysdep.cc +++ b/src/sysdep.cc @@ -91,12 +91,6 @@ #define STDIN_FILENO 1 #endif -// Octave's idea of infinity. -double octave_Inf; - -// Octave's idea of not a number. -double octave_NaN; - // Nonzero if the machine we are running on is big-endian. int octave_words_big_endian; @@ -126,51 +120,6 @@ #endif static void -octave_ieee_init (void) -{ -#if defined (HAVE_ISINF) || defined (HAVE_FINITE) - -// Some version of gcc on some old version of Linux used to crash when -// trying to make Inf and NaN. - -#if defined (HAVE_INFINITY) - octave_Inf = (double) infinity (); -#elif defined (linux) - octave_Inf = HUGE_VAL; -#elif defined (__alpha__) - extern unsigned int DINFINITY[2]; - octave_Inf = (*((double *) (DINFINITY))); -#else - double tmp = 1e+10; - octave_Inf = tmp; - for (;;) - { - octave_Inf *= 1e+10; - if (octave_Inf == tmp) - break; - tmp = octave_Inf; - } -#endif - -#endif - -#if defined (HAVE_ISNAN) - -#if defined (HAVE_QUIET_NAN) - octave_NaN = (double) quiet_nan (); -#elif defined (linux) - octave_NaN = NAN; -#elif defined (__alpha__) - extern unsigned int DQNAN[2]; - octave_NaN = (*((double *) (DQNAN))); -#else - octave_NaN = octave_Inf / octave_Inf; -#endif - -#endif -} - -static void ten_little_endians (void) { // Are we little or big endian? From Harbison & Steele.
--- a/src/sysdep.h +++ b/src/sysdep.h @@ -26,6 +26,8 @@ #include <string> +#include "lo-ieee.h" + extern void sysdep_init (void); extern void raw_mode (int); @@ -38,12 +40,6 @@ extern int gethostname (char *, int); #endif -// Octave's idea of infinity. -extern double octave_Inf; - -// Octave's idea of not a number. -extern double octave_NaN; - // Nonzero if the machine we are running on is big-endian. extern int octave_words_big_endian;
--- a/src/utils.h +++ b/src/utils.h @@ -29,6 +29,8 @@ #include <string> +#include "lo-utils.h" + class Octave_object; class string_vector; @@ -53,11 +55,6 @@ extern string_vector get_fcn_file_names (int = 0); -extern int NINT (double x); -extern double D_NINT (double x); - -extern string_vector make_argv (const Octave_object&, const string&); - extern int empty_arg (const char *name, int nr, int nc); extern string undo_string_escapes (const string& s);