changeset 3164:45490c020e47

[project @ 1998-04-14 20:56:48 by jwe]
author jwe
date Tue, 14 Apr 1998 20:56:53 +0000
parents 7f7228c0e658
children e4bbfc196e53
files ChangeLog NEWS install-octave.in libcruft/ChangeLog liboctave/Array-C.cc liboctave/Array-b.cc liboctave/Array-ch.cc liboctave/Array-d.cc liboctave/Array-i.cc liboctave/Array-s.cc liboctave/Array2-idx.h liboctave/ChangeLog liboctave/lo-specfun.cc scripts/ChangeLog src/ChangeLog src/help.cc src/pr-output.cc
diffstat 17 files changed, 116 insertions(+), 45 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Apr 10 16:51:47 1998 +0000
+++ b/ChangeLog	Tue Apr 14 20:56:53 1998 +0000
@@ -1,3 +1,10 @@
+Tue Apr 14 15:33:20 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* install-octave.in: Improve error messages if version number or
+	host architecture can't be found.
+
+	* install-octave.in: Don't install info reader.
+
 Fri Mar 27 02:54:59 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* aclocal.m4 (OCTAVE_F2C_F77_COMPAT): Use a Fortran subroutine
--- a/NEWS	Fri Apr 10 16:51:47 1998 +0000
+++ b/NEWS	Tue Apr 14 20:56:53 1998 +0000
@@ -1,6 +1,9 @@
 Summary of changes for version 2.1.x:
 ------------------------------------
 
+  * For matrices, x(:) now works no matter what the value of
+    do_fortran_indexing is.
+
   * Octave's expression parser is more general and consistent.  It is
     now possible to access structure elements and index arbitrary
     values.  For example, expressions like
--- a/install-octave.in	Fri Apr 10 16:51:47 1998 +0000
+++ b/install-octave.in	Tue Apr 14 20:56:53 1998 +0000
@@ -12,7 +12,13 @@
 
 if test -z "$version"
 then
-  echo "install-octave: no version number!"
+  cat <<EOF 
+install-octave: no version number!
+
+Are you sure you have a binary distribution of Octave?  If you are
+trying to install Octave from its sources, please read and follow
+the directions given in the file INSTALL.OCTAVE.
+EOF
   exit 1
 fi
 
@@ -21,7 +27,13 @@
 
 if test -z "$canonical_host_type"
 then
-  echo "install-octave: host archetecture not found!"
+  cat <<EOF 
+install-octave: host archetecture not found!
+
+Are you sure you have a binary distribution of Octave?  If you are
+trying to install Octave from its sources, please read and follow
+the directions given in the file INSTALL.OCTAVE.
+EOF
   exit 1
 fi
 
@@ -224,10 +236,6 @@
 cp octave-bug $bindir/octave-bug
 chmod 755 $bindir/octave-bug
 
-echo "installing info as $archlibdir/info"
-cp info/info $archlibdir/info
-chmod 755 $archlibdir/info
-
 if test -f LIBRARIES; then
   echo "installing shared libraries in $octlibdir"
   for f in `cat LIBRARIES`
--- a/libcruft/ChangeLog	Fri Apr 10 16:51:47 1998 +0000
+++ b/libcruft/ChangeLog	Tue Apr 14 20:56:53 1998 +0000
@@ -1,3 +1,7 @@
+Tue Apr 14 14:01:22 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* slatec-fn/xdgamit.f (xdgamit): New file.
+
 Mon Apr  6 00:26:35 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* slatec-fn/xdgami.f (xdgami): Reorder args to match dgami.
--- a/liboctave/Array-C.cc	Fri Apr 10 16:51:47 1998 +0000
+++ b/liboctave/Array-C.cc	Tue Apr 14 20:56:53 1998 +0000
@@ -33,22 +33,22 @@
 
 template class Array<Complex>;
 
-template void assign (Array<Complex>&, const Array<Complex>&);
-template void assign (Array<Complex>&, const Array<double>&);
-template void assign (Array<Complex>&, const Array<int>&);
-template void assign (Array<Complex>&, const Array<short>&);
-template void assign (Array<Complex>&, const Array<char>&);
+template int assign (Array<Complex>&, const Array<Complex>&);
+template int assign (Array<Complex>&, const Array<double>&);
+template int assign (Array<Complex>&, const Array<int>&);
+template int assign (Array<Complex>&, const Array<short>&);
+template int assign (Array<Complex>&, const Array<char>&);
 
 #include "Array2.h"
 #include "Array2.cc"
 
 template class Array2<Complex>;
 
-template void assign (Array2<Complex>&, const Array2<Complex>&);
-template void assign (Array2<Complex>&, const Array2<double>&);
-template void assign (Array2<Complex>&, const Array2<int>&);
-template void assign (Array2<Complex>&, const Array2<short>&);
-template void assign (Array2<Complex>&, const Array2<char>&);
+template int assign (Array2<Complex>&, const Array2<Complex>&);
+template int assign (Array2<Complex>&, const Array2<double>&);
+template int assign (Array2<Complex>&, const Array2<int>&);
+template int assign (Array2<Complex>&, const Array2<short>&);
+template int assign (Array2<Complex>&, const Array2<char>&);
 
 #include "DiagArray2.h"
 #include "DiagArray2.cc"
--- a/liboctave/Array-b.cc	Fri Apr 10 16:51:47 1998 +0000
+++ b/liboctave/Array-b.cc	Tue Apr 14 20:56:53 1998 +0000
@@ -31,7 +31,7 @@
 
 template class Array<bool>;
 
-template void assign (Array<bool>&, const Array<bool>&);
+template int assign (Array<bool>&, const Array<bool>&);
 
 #include "Array2.h"
 #include "Array2.cc"
--- a/liboctave/Array-ch.cc	Fri Apr 10 16:51:47 1998 +0000
+++ b/liboctave/Array-ch.cc	Tue Apr 14 20:56:53 1998 +0000
@@ -31,14 +31,14 @@
 
 template class Array<char>;
 
-template void assign (Array<char>&, const Array<char>&);
+template int assign (Array<char>&, const Array<char>&);
 
 #include "Array2.h"
 #include "Array2.cc"
 
 template class Array2<char>;
 
-template void assign (Array2<char>&, const Array2<char>&);
+template int assign (Array2<char>&, const Array2<char>&);
 
 #include "DiagArray2.h"
 #include "DiagArray2.cc"
--- a/liboctave/Array-d.cc	Fri Apr 10 16:51:47 1998 +0000
+++ b/liboctave/Array-d.cc	Tue Apr 14 20:56:53 1998 +0000
@@ -31,20 +31,20 @@
 
 template class Array<double>;
 
-template void assign (Array<double>&, const Array<double>&);
-template void assign (Array<double>&, const Array<int>&);
-template void assign (Array<double>&, const Array<short>&);
-template void assign (Array<double>&, const Array<char>&);
+template int assign (Array<double>&, const Array<double>&);
+template int assign (Array<double>&, const Array<int>&);
+template int assign (Array<double>&, const Array<short>&);
+template int assign (Array<double>&, const Array<char>&);
 
 #include "Array2.h"
 #include "Array2.cc"
 
 template class Array2<double>;
 
-template void assign (Array2<double>&, const Array2<double>&);
-template void assign (Array2<double>&, const Array2<int>&);
-template void assign (Array2<double>&, const Array2<short>&);
-template void assign (Array2<double>&, const Array2<char>&);
+template int assign (Array2<double>&, const Array2<double>&);
+template int assign (Array2<double>&, const Array2<int>&);
+template int assign (Array2<double>&, const Array2<short>&);
+template int assign (Array2<double>&, const Array2<char>&);
 
 #include "DiagArray2.h"
 #include "DiagArray2.cc"
--- a/liboctave/Array-i.cc	Fri Apr 10 16:51:47 1998 +0000
+++ b/liboctave/Array-i.cc	Tue Apr 14 20:56:53 1998 +0000
@@ -31,18 +31,18 @@
 
 template class Array<int>;
 
-template void assign (Array<int>&, const Array<int>&);
-template void assign (Array<int>&, const Array<short>&);
-template void assign (Array<int>&, const Array<char>&);
+template int assign (Array<int>&, const Array<int>&);
+template int assign (Array<int>&, const Array<short>&);
+template int assign (Array<int>&, const Array<char>&);
 
 #include "Array2.h"
 #include "Array2.cc"
 
 template class Array2<int>;
 
-template void assign (Array2<int>&, const Array2<int>&);
-template void assign (Array2<int>&, const Array2<short>&);
-template void assign (Array2<int>&, const Array2<char>&);
+template int assign (Array2<int>&, const Array2<int>&);
+template int assign (Array2<int>&, const Array2<short>&);
+template int assign (Array2<int>&, const Array2<char>&);
 
 #include "DiagArray2.h"
 #include "DiagArray2.cc"
--- a/liboctave/Array-s.cc	Fri Apr 10 16:51:47 1998 +0000
+++ b/liboctave/Array-s.cc	Tue Apr 14 20:56:53 1998 +0000
@@ -31,16 +31,16 @@
 
 template class Array<short>;
 
-template void assign (Array<short>&, const Array<short>&);
-template void assign (Array<short>&, const Array<char>&);
+template int assign (Array<short>&, const Array<short>&);
+template int assign (Array<short>&, const Array<char>&);
 
 #include "Array2.h"
 #include "Array2.cc"
 
 template class Array2<short>;
 
-template void assign (Array2<short>&, const Array2<short>&);
-template void assign (Array2<short>&, const Array2<char>&);
+template int assign (Array2<short>&, const Array2<short>&);
+template int assign (Array2<short>&, const Array2<char>&);
 
 #include "DiagArray2.h"
 #include "DiagArray2.cc"
--- a/liboctave/Array2-idx.h	Fri Apr 10 16:51:47 1998 +0000
+++ b/liboctave/Array2-idx.h	Tue Apr 14 20:56:53 1998 +0000
@@ -103,7 +103,7 @@
 	    retval = Array2<T> (tmp, 1, len);
 	}
     }
-  else if (liboctave_dfi_flag)
+  else if (liboctave_dfi_flag || idx.is_colon ())
     {
       // This code is only for indexing matrices.  The vector
       // cases are handled above.
@@ -173,6 +173,8 @@
 	    retval.resize (0, 0);
 	  else if (idx_j.is_colon_equiv (nc, 1))
 	    retval.resize (0, nc);
+	  else if (idx_i.is_colon_equiv (nr, 1))
+	    retval.resize (0, m);
 	  else
 	    (*current_liboctave_error_handler) ("invalid row index = 0");
 	}
@@ -182,6 +184,8 @@
 	    retval.resize (0, 0);
 	  else if (idx_i.is_colon_equiv (nr, 1))
 	    retval.resize (nr, 0);
+	  else if (idx_j.is_colon_equiv (nc, 1))
+	    retval.resize (n, 0);
 	  else
 	    (*current_liboctave_error_handler) ("invalid column index = 0");
 	}
--- a/liboctave/ChangeLog	Fri Apr 10 16:51:47 1998 +0000
+++ b/liboctave/ChangeLog	Tue Apr 14 20:56:53 1998 +0000
@@ -1,3 +1,20 @@
+Tue Apr 14 14:41:30 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* Array2-idx.h (index): Allow x(:) even when do_fortran_indexing
+	is not set.
+	(index): Allow x = zeros (2, 0); x(1,:) to work.
+
+	* lo-specfun.cc (gammainc): Use dgamit to compute
+	(\int_0^x exp(-t) t^(a-1) dt)/gamma(a), not just
+	\int_0^x exp(-t) t^(a-1) dt.
+
+Wed Apr  8 22:50:44 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* Array-C.cc, Array-b.cc, Array-ch.cc, Array-i.cc, Array-d.cc,
+	Array-s.cc: Change return types of all `assign' explicit
+	instantiations to be int, not void, to match the template decl in
+	Array.h.
+
 Mon Apr  6 00:27:06 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* lo-specfun.cc (gammainc): Reorder args in call to xdgami.
--- a/liboctave/lo-specfun.cc	Fri Apr 10 16:51:47 1998 +0000
+++ b/liboctave/lo-specfun.cc	Tue Apr 14 20:56:53 1998 +0000
@@ -60,7 +60,7 @@
 
   int F77_FCN (xdgamma, XDGAMMA) (const double&, double&);
 
-  int F77_FCN (xdgami, XDGAMI) (const double&, const double&, double&);
+  int F77_FCN (xdgamit, XDGAMIT) (const double&, const double&, double&);
 
   int F77_FCN (dlgams, DLGAMS) (const double&, double&, double&);
 }
@@ -472,11 +472,20 @@
   return retval;
 }
 
+// XXX FIXME XXX -- there is still room for improvement here...
+
 double
 gammainc (double x, double a)
 {
   double retval;
-  F77_XFCN (xdgami, XDGAMI, (a, x, retval));
+
+  F77_XFCN (xdgamit, XDGAMIT, (a, x, retval));
+
+  if (x == 0.0)
+    retval = 0.0;
+  else if (x > 0.0)
+    retval = exp (a * log (x) + log (retval));
+
   return retval;
 }
 
--- a/scripts/ChangeLog	Fri Apr 10 16:51:47 1998 +0000
+++ b/scripts/ChangeLog	Tue Apr 14 20:56:53 1998 +0000
@@ -1,3 +1,10 @@
+Fri Apr 10 10:46:21 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* miscellaneous/dump_prefs.m: Use string array for list of values.
+	Move functionality of dump_1_pref here, but use built-in function
+	type to extract value, and put it inside try/catch block.
+	* miscellaneous/dump_1_pref.m: Delete unused function.
+
 Wed Apr  8 13:17:58 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* plot/__pltopt1.m__: New file.
--- a/src/ChangeLog	Fri Apr 10 16:51:47 1998 +0000
+++ b/src/ChangeLog	Tue Apr 14 20:56:53 1998 +0000
@@ -1,5 +1,12 @@
+Fri Apr 10 11:01:27 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* help.cc (type): Also print values of variables.
+
 Wed Apr  8 01:00:58 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
+	* pr-output.cc (set_format): Set scale to 1.0 if all elements are
+	int or inf or nan.
+
 	* parse.y (Vwarn_future_time_stamp): New variable.
 	(symbols_of_parse): Add DEFVAR for it.
 	(warn_future_time_stamp): New function.
--- a/src/help.cc	Fri Apr 10 16:51:47 1998 +0000
+++ b/src/help.cc	Tue Apr 14 20:56:53 1998 +0000
@@ -922,10 +922,15 @@
 					   << "' has unknown type!\n";
 			    }
 			}
+
+		      defn.print_raw (output_buf, true);
+
+		      if (nargout == 0)
+			output_buf << "\n";
 		    }
 		}
 	      else
-		output_buf << "type: `" << argv[i] << "' has unknown type!\n";
+		error ("type: `%s' has unknown type!", argv[i].c_str ());
 	    }
 	  else
 	    {
@@ -951,7 +956,7 @@
 			       << "' for reading!\n";
 		}
 	      else
-		output_buf << "type: `" << argv[i] << "' undefined\n";
+		error ("type: `%s' undefined", argv[i].c_str ());
 	    }
 	}
 
--- a/src/pr-output.cc	Fri Apr 10 16:51:47 1998 +0000
+++ b/src/pr-output.cc	Tue Apr 14 20:56:53 1998 +0000
@@ -400,7 +400,7 @@
   int x_min = min_abs == 0.0
     ? 0 : static_cast<int> (floor (log10 (min_abs) + 1.0));
 
-  scale = x_max == 0 ? 1.0 : pow (10.0, x_max - 1);
+  scale = (x_max == 0 || int_or_inf_or_nan) ? 1.0 : pow (10.0, x_max - 1);
 
   set_real_matrix_format (sign, x_max, x_min, inf_or_nan,
 			  int_or_inf_or_nan, fw);
@@ -745,7 +745,7 @@
   int x_max = r_x_max > i_x_max ? r_x_max : i_x_max;
   int x_min = r_x_min > i_x_min ? r_x_min : i_x_min;
 
-  scale = x_max == 0 ? 1.0 : pow (10.0, x_max - 1);
+  scale = (x_max == 0 || int_or_inf_or_nan) ? 1.0 : pow (10.0, x_max - 1);
 
   set_complex_matrix_format (sign, x_max, x_min, r_x_max, r_x_min,
 			     inf_or_nan, int_or_inf_or_nan, r_fw, i_fw);
@@ -887,7 +887,7 @@
   int x_min = min_abs == 0.0
     ? 0 : static_cast<int> (floor (log10 (min_abs) + 1.0));
 
-  scale = x_max == 0 ? 1.0 : pow (10.0, x_max - 1);
+  scale = (x_max == 0 || all_ints) ? 1.0 : pow (10.0, x_max - 1);
 
   set_range_format (sign, x_max, x_min, all_ints, fw);
 }