changeset 4293:977f977fb2c3

[project @ 2003-01-06 18:18:14 by jwe]
author jwe
date Mon, 06 Jan 2003 18:18:14 +0000
parents c8f6dd25219d
children 755f6509bb01
files liboctave/ChangeLog liboctave/dMatrix.cc scripts/io/beep.m src/ChangeLog src/oct-stream.cc
diffstat 5 files changed, 24 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/ChangeLog	Sun Jan 05 07:50:29 2003 +0000
+++ b/liboctave/ChangeLog	Mon Jan 06 18:18:14 2003 +0000
@@ -1,3 +1,8 @@
+2003-01-06  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* dMatrix.cc (Matrix::read): Set size and return immediately if
+	there is nothing to read.
+
 2003-01-05  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* lo-cutils.c: Define _XOPEN_SOURCE.
--- a/liboctave/dMatrix.cc	Sun Jan 05 07:50:29 2003 +0000
+++ b/liboctave/dMatrix.cc	Mon Jan 06 18:18:14 2003 +0000
@@ -2443,6 +2443,16 @@
 	      oct_data_conv::data_type dt, int skip,
 	      oct_mach_info::float_format flt_fmt)
 {
+  if (nr == 0 || nc == 0)
+    {
+      if (nr >= 0 && nc >= 0)
+	resize (nr, nc);
+      else
+	resize (0, 0);
+
+      return 0;
+    }
+
   int retval = -1;
 
   bool ok = true;
--- a/scripts/io/beep.m	Sun Jan 05 07:50:29 2003 +0000
+++ b/scripts/io/beep.m	Mon Jan 06 18:18:14 2003 +0000
@@ -19,9 +19,9 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} puts (@var{string})
-## Write a string to the standard output with no formatting.
+## Produce a beep from the speaker (or visual bell).
 ## @end deftypefn
-## @seealso{fputs, printf and fprintf}
+## @seealso{puts, fputs, printf and fprintf}
 
 ## Author: jwe
 
--- a/src/ChangeLog	Sun Jan 05 07:50:29 2003 +0000
+++ b/src/ChangeLog	Mon Jan 06 18:18:14 2003 +0000
@@ -1,3 +1,8 @@
+2003-01-06  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* oct-stream.cc (get_size): If only one dimension is specified and
+	it is zero, also set the other dimension to zero instead of one.
+
 2003-01-04  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* sysdep.cc [__DECCXX]: Add a kluge for some missing template
--- a/src/oct-stream.cc	Sun Jan 05 07:50:29 2003 +0000
+++ b/src/oct-stream.cc	Mon Jan 06 18:18:14 2003 +0000
@@ -123,7 +123,8 @@
       one_elt_size_spec = true;
 
       dnr = size (0);
-      dnc = 1.0;
+
+      dnc = (dnr == 0.0) ? 0.0 : 1.0;
     }
   else if (sz_len == 2)
     {