# HG changeset patch # User jwe # Date 848088081 0 # Node ID 4f095783ee437ca51676c44d7e2dfcb8f8e2865d # Parent 19b33e933eae7aaff34245525afd93758f2a63d1 [project @ 1996-11-15 20:00:59 by jwe] diff -r 19b33e933eae -r 4f095783ee43 liboctave/ChangeLog --- a/liboctave/ChangeLog Fri Nov 15 05:28:26 1996 +0000 +++ b/liboctave/ChangeLog Fri Nov 15 20:01:21 1996 +0000 @@ -1,3 +1,7 @@ +Fri Nov 15 13:47:34 1996 John W. Eaton + + * lo-ieee.h: [SCO]: Declare isinf and isnan. + Thu Nov 14 00:06:53 1996 John W. Eaton * Version 1.92. diff -r 19b33e933eae -r 4f095783ee43 liboctave/lo-ieee.h --- a/liboctave/lo-ieee.h Fri Nov 15 05:28:26 1996 +0000 +++ b/liboctave/lo-ieee.h Fri Nov 15 20:01:21 1996 +0000 @@ -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 /* diff -r 19b33e933eae -r 4f095783ee43 src/ChangeLog --- a/src/ChangeLog Fri Nov 15 05:28:26 1996 +0000 +++ b/src/ChangeLog Fri Nov 15 20:01:21 1996 +0000 @@ -1,3 +1,15 @@ +Fri Nov 15 13:48:02 1996 John W. Eaton + + * 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 * pt-plot.cc (Fgset, Fgshow): New commands. diff -r 19b33e933eae -r 4f095783ee43 src/defaults.cc --- a/src/defaults.cc Fri Nov 15 05:28:26 1996 +0000 +++ b/src/defaults.cc Fri Nov 15 20:01:21 1996 +0000 @@ -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; } } diff -r 19b33e933eae -r 4f095783ee43 src/mappers.cc --- a/src/mappers.cc Fri Nov 15 05:28:26 1996 +0000 +++ b/src/mappers.cc Fri Nov 15 20:01:21 1996 +0000 @@ -29,6 +29,7 @@ #include "oct-cmplx.h" #include "oct-math.h" +#include "lo-ieee.h" #include "defun.h" #include "error.h" diff -r 19b33e933eae -r 4f095783ee43 src/pr-output.cc --- a/src/pr-output.cc Fri Nov 15 05:28:26 1996 +0000 +++ b/src/pr-output.cc Fri Nov 15 20:01:21 1996 +0000 @@ -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 ();