# HG changeset patch # User jwe # Date 892587413 0 # Node ID 45490c020e47401a5cee9ede0d7029bdb07ad23e # Parent 7f7228c0e658248d7ca3690bdfc1088ea7546356 [project @ 1998-04-14 20:56:48 by jwe] diff -r 7f7228c0e658 -r 45490c020e47 ChangeLog --- 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 + + * 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 * aclocal.m4 (OCTAVE_F2C_F77_COMPAT): Use a Fortran subroutine diff -r 7f7228c0e658 -r 45490c020e47 NEWS --- 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 diff -r 7f7228c0e658 -r 45490c020e47 install-octave.in --- 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 < + + * slatec-fn/xdgamit.f (xdgamit): New file. + Mon Apr 6 00:26:35 1998 John W. Eaton * slatec-fn/xdgami.f (xdgami): Reorder args to match dgami. diff -r 7f7228c0e658 -r 45490c020e47 liboctave/Array-C.cc --- 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; -template void assign (Array&, const Array&); -template void assign (Array&, const Array&); -template void assign (Array&, const Array&); -template void assign (Array&, const Array&); -template void assign (Array&, const Array&); +template int assign (Array&, const Array&); +template int assign (Array&, const Array&); +template int assign (Array&, const Array&); +template int assign (Array&, const Array&); +template int assign (Array&, const Array&); #include "Array2.h" #include "Array2.cc" template class Array2; -template void assign (Array2&, const Array2&); -template void assign (Array2&, const Array2&); -template void assign (Array2&, const Array2&); -template void assign (Array2&, const Array2&); -template void assign (Array2&, const Array2&); +template int assign (Array2&, const Array2&); +template int assign (Array2&, const Array2&); +template int assign (Array2&, const Array2&); +template int assign (Array2&, const Array2&); +template int assign (Array2&, const Array2&); #include "DiagArray2.h" #include "DiagArray2.cc" diff -r 7f7228c0e658 -r 45490c020e47 liboctave/Array-b.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; -template void assign (Array&, const Array&); +template int assign (Array&, const Array&); #include "Array2.h" #include "Array2.cc" diff -r 7f7228c0e658 -r 45490c020e47 liboctave/Array-ch.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; -template void assign (Array&, const Array&); +template int assign (Array&, const Array&); #include "Array2.h" #include "Array2.cc" template class Array2; -template void assign (Array2&, const Array2&); +template int assign (Array2&, const Array2&); #include "DiagArray2.h" #include "DiagArray2.cc" diff -r 7f7228c0e658 -r 45490c020e47 liboctave/Array-d.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; -template void assign (Array&, const Array&); -template void assign (Array&, const Array&); -template void assign (Array&, const Array&); -template void assign (Array&, const Array&); +template int assign (Array&, const Array&); +template int assign (Array&, const Array&); +template int assign (Array&, const Array&); +template int assign (Array&, const Array&); #include "Array2.h" #include "Array2.cc" template class Array2; -template void assign (Array2&, const Array2&); -template void assign (Array2&, const Array2&); -template void assign (Array2&, const Array2&); -template void assign (Array2&, const Array2&); +template int assign (Array2&, const Array2&); +template int assign (Array2&, const Array2&); +template int assign (Array2&, const Array2&); +template int assign (Array2&, const Array2&); #include "DiagArray2.h" #include "DiagArray2.cc" diff -r 7f7228c0e658 -r 45490c020e47 liboctave/Array-i.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; -template void assign (Array&, const Array&); -template void assign (Array&, const Array&); -template void assign (Array&, const Array&); +template int assign (Array&, const Array&); +template int assign (Array&, const Array&); +template int assign (Array&, const Array&); #include "Array2.h" #include "Array2.cc" template class Array2; -template void assign (Array2&, const Array2&); -template void assign (Array2&, const Array2&); -template void assign (Array2&, const Array2&); +template int assign (Array2&, const Array2&); +template int assign (Array2&, const Array2&); +template int assign (Array2&, const Array2&); #include "DiagArray2.h" #include "DiagArray2.cc" diff -r 7f7228c0e658 -r 45490c020e47 liboctave/Array-s.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; -template void assign (Array&, const Array&); -template void assign (Array&, const Array&); +template int assign (Array&, const Array&); +template int assign (Array&, const Array&); #include "Array2.h" #include "Array2.cc" template class Array2; -template void assign (Array2&, const Array2&); -template void assign (Array2&, const Array2&); +template int assign (Array2&, const Array2&); +template int assign (Array2&, const Array2&); #include "DiagArray2.h" #include "DiagArray2.cc" diff -r 7f7228c0e658 -r 45490c020e47 liboctave/Array2-idx.h --- 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 (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"); } diff -r 7f7228c0e658 -r 45490c020e47 liboctave/ChangeLog --- 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 + + * 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 + + * 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 * lo-specfun.cc (gammainc): Reorder args in call to xdgami. diff -r 7f7228c0e658 -r 45490c020e47 liboctave/lo-specfun.cc --- 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; } diff -r 7f7228c0e658 -r 45490c020e47 scripts/ChangeLog --- 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 + + * 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 * plot/__pltopt1.m__: New file. diff -r 7f7228c0e658 -r 45490c020e47 src/ChangeLog --- 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 + + * help.cc (type): Also print values of variables. + Wed Apr 8 01:00:58 1998 John W. Eaton + * 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. diff -r 7f7228c0e658 -r 45490c020e47 src/help.cc --- 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 ()); } } diff -r 7f7228c0e658 -r 45490c020e47 src/pr-output.cc --- 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 (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 (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); }