Mercurial > octave-nkf
diff src/sysdep.cc @ 2317:8c09c04f7747
[project @ 1996-07-14 22:30:15 by jwe]
author | jwe |
---|---|
date | Sun, 14 Jul 1996 22:40:35 +0000 |
parents | bfb775fb6fe8 |
children | a45c7d64b5e3 |
line wrap: on
line diff
--- a/src/sysdep.cc Fri Jul 12 18:52:41 1996 +0000 +++ b/src/sysdep.cc Sun Jul 14 22:40:35 1996 +0000 @@ -71,7 +71,7 @@ extern char *term_clrpag; extern "C" void _rl_output_character_function (); -#include "float-fmt.h" +#include "mach-info.h" #include "oct-math.h" #include "defun.h" @@ -90,9 +90,6 @@ #define STDIN_FILENO 1 #endif -// Nonzero if the machine we are running on is big-endian. -int octave_words_big_endian; - #ifdef NeXT extern "C" { @@ -118,22 +115,6 @@ } #endif -static void -ten_little_endians (void) -{ - // Are we little or big endian? From Harbison & Steele. - - union - { - long l; - char c[sizeof (long)]; - } u; - - u.l = 1; - - octave_words_big_endian = (u.c[sizeof (long) - 1] == 1); -} - #if defined (EXCEPTION_IN_MATH) extern "C" int @@ -175,13 +156,6 @@ #endif octave_ieee_init (); - - int status = float_format_init (); - - if (status < 0) - panic ("unrecognized floating point format!"); - - ten_little_endians (); } // Set terminal in raw mode. From less-177. @@ -529,8 +503,11 @@ DEFUN (isieee, , , "isieee (): return 1 if host uses IEEE floating point") { - return (double) (native_float_format == OCTAVE_IEEE_LITTLE - || native_float_format == OCTAVE_IEEE_BIG); + oct_mach_info::float_format flt_fmt = + oct_mach_info::native_float_format (); + + return (double) (flt_fmt == oct_mach_info::ieee_little_endian + || flt_fmt == oct_mach_info::ieee_big_endian); } #if !defined (HAVE_GETHOSTNAME) && defined (HAVE_SYS_UTSNAME_H)