comparison src/pr-output.cc @ 2317:8c09c04f7747

[project @ 1996-07-14 22:30:15 by jwe]
author jwe
date Sun, 14 Jul 1996 22:40:35 +0000
parents 5a3f1d00a474
children be4616e36133
comparison
equal deleted inserted replaced
2316:fbc76f6e4893 2317:8c09c04f7747
33 #include <strstream.h> 33 #include <strstream.h>
34 34
35 #include "CMatrix.h" 35 #include "CMatrix.h"
36 #include "Range.h" 36 #include "Range.h"
37 #include "dMatrix.h" 37 #include "dMatrix.h"
38 #include "float-fmt.h" 38 #include "mach-info.h"
39 #include "oct-cmplx.h" 39 #include "oct-cmplx.h"
40 #include "oct-math.h" 40 #include "oct-math.h"
41 #include "oct-term.h" 41 #include "oct-term.h"
42 #include "str-vec.h" 42 #include "str-vec.h"
43 43
990 // format. 990 // format.
991 991
992 // XXX FIXME XXX -- is it correct to swap bytes for VAX 992 // XXX FIXME XXX -- is it correct to swap bytes for VAX
993 // formats and not for Cray? 993 // formats and not for Cray?
994 994
995 oct_mach_info::float_format flt_fmt =
996 oct_mach_info::native_float_format ();
997
995 if (hex_format > 1 998 if (hex_format > 1
996 || native_float_format == OCTAVE_IEEE_BIG 999 || flt_fmt == oct_mach_info::ieee_big_endian
997 || native_float_format == OCTAVE_CRAY 1000 || flt_fmt == oct_mach_info::cray
998 || native_float_format == OCTAVE_UNKNOWN_FLT_FMT) 1001 || flt_fmt == oct_mach_info::unknown)
999 { 1002 {
1000 for (size_t i = 0; i < sizeof (double); i++) 1003 for (size_t i = 0; i < sizeof (double); i++)
1001 os.form ("%02x", (int) tmp.i[i]); 1004 os.form ("%02x", (int) tmp.i[i]);
1002 } 1005 }
1003 else 1006 else
1015 // format. 1018 // format.
1016 1019
1017 // XXX FIXME XXX -- is it correct to swap bytes for VAX 1020 // XXX FIXME XXX -- is it correct to swap bytes for VAX
1018 // formats and not for Cray? 1021 // formats and not for Cray?
1019 1022
1020 if (native_float_format == OCTAVE_IEEE_BIG 1023 oct_mach_info::float_format flt_fmt =
1021 || native_float_format == OCTAVE_CRAY 1024 oct_mach_info::native_float_format ();
1022 || native_float_format == OCTAVE_UNKNOWN_FLT_FMT) 1025
1026 if (flt_fmt == oct_mach_info::ieee_big_endian
1027 || flt_fmt == oct_mach_info::cray
1028 || flt_fmt == oct_mach_info::unknown)
1023 { 1029 {
1024 for (size_t i = 0; i < sizeof (double); i++) 1030 for (size_t i = 0; i < sizeof (double); i++)
1025 PRINT_CHAR_BITS (os, tmp.i[i]); 1031 PRINT_CHAR_BITS (os, tmp.i[i]);
1026 } 1032 }
1027 else 1033 else