Mercurial > hg > octave-lyh
changeset 2522:4f095783ee43
[project @ 1996-11-15 20:00:59 by jwe]
author | jwe |
---|---|
date | Fri, 15 Nov 1996 20:01:21 +0000 |
parents | 19b33e933eae |
children | 007e977442b8 |
files | liboctave/ChangeLog liboctave/lo-ieee.h src/ChangeLog src/defaults.cc src/mappers.cc src/pr-output.cc |
diffstat | 6 files changed, 32 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,7 @@ +Fri Nov 15 13:47:34 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * lo-ieee.h: [SCO]: Declare isinf and isnan. + Thu Nov 14 00:06:53 1996 John W. Eaton <jwe@bevo.che.wisc.edu> * Version 1.92.
--- a/liboctave/lo-ieee.h +++ b/liboctave/lo-ieee.h @@ -31,6 +31,11 @@ extern void octave_ieee_init (void); +#if defined (SCO) +extern "C" int isnan (double); +extern "C" int isinf (double); +#endif + #endif /*
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +Fri Nov 15 13:48:02 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * defaults.cc (subst_octave_home): Start subsequent searchs from + the end of the replaced text. + + * pr-output.cc (pr_any_float): Kluge for SCO systems. + + * pr-output.cc (pr_any_float, pr_complex): Don't declare inline. + + * mappers.cc: Include lo-ieee.h, for isinf and isnan on SCO + systems. + Thu Nov 14 00:06:19 1996 John W. Eaton <jwe@bevo.che.wisc.edu> * pt-plot.cc (Fgset, Fgshow): New commands.
--- a/src/defaults.cc +++ b/src/defaults.cc @@ -93,10 +93,10 @@ { int len = prefix.length (); size_t start = 0; - while ((start = retval.find (prefix)) != NPOS) + while ((start = retval.find (prefix, start)) != NPOS) { retval.replace (start, len, Voctave_home); - start++; + start += len; } }
--- a/src/mappers.cc +++ b/src/mappers.cc @@ -29,6 +29,7 @@ #include "oct-cmplx.h" #include "oct-math.h" +#include "lo-ieee.h" #include "defun.h" #include "error.h"
--- a/src/pr-output.cc +++ b/src/pr-output.cc @@ -888,11 +888,17 @@ } \ while (0) -static inline void +static void pr_any_float (const char *fmt, ostream& os, double d, int fw = 0) { +#if defined (SCO) + // Apparently on some SCO systems NaN == -0.0 is true. Compiler bug? + if (d == -0.0 && ! xisnan (d)) + d = 0.0; +#else if (d == -0.0) d = 0.0; +#endif if (fmt) { @@ -998,7 +1004,7 @@ pr_any_float (curr_imag_fmt, os, d, fw); } -static inline void +static void pr_complex (ostream& os, const Complex& c, int r_fw = 0, int i_fw = 0) { double r = c.real ();