changeset 6202:e5ed0d1edddc

[project @ 2006-12-05 21:49:44 by jwe]
author jwe
date Tue, 05 Dec 2006 21:49:45 +0000
parents 42efaffa4f08
children 512d72ee321f
files liboctave/ChangeLog liboctave/lo-utils.cc src/ChangeLog src/load-save.cc src/ls-oct-ascii.cc
diffstat 5 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/ChangeLog	Tue Dec 05 19:45:58 2006 +0000
+++ b/liboctave/ChangeLog	Tue Dec 05 21:49:45 2006 +0000
@@ -1,3 +1,9 @@
+2006-12-05  John W. Eaton  <jwe@octave.org>
+
+	* lo-utils.cc (octave_read_double): If we see '+' or '-' but not
+	followed by 'I' or 'i', try reading number after putting
+	characters back on input stream.
+
 2006-12-05  Paul Kienzle  <pkienzle@users.sf.net>
 
 	* randpoisson.c (oct_fill_randp): For lambda > 1e8, upper limit of
--- a/liboctave/lo-utils.cc	Tue Dec 05 19:45:58 2006 +0000
+++ b/liboctave/lo-utils.cc	Tue Dec 05 21:49:45 2006 +0000
@@ -278,6 +278,7 @@
 	  {
 	    is.putback (c2);
 	    is.putback (c1);
+	    is >> d;
 	  }
       }
       break;
@@ -292,6 +293,7 @@
 	  {
 	    is.putback (c2);
 	    is.putback (c1);
+	    is >> d;
 	  }
       }
       break;
--- a/src/ChangeLog	Tue Dec 05 19:45:58 2006 +0000
+++ b/src/ChangeLog	Tue Dec 05 21:49:45 2006 +0000
@@ -1,5 +1,8 @@
 2006-12-05  John W. Eaton  <jwe@octave.org>
 
+	* ls-oct-ascii.cc (extract_keyword): If no match and looking for
+	more, skip to end of line before trying another match.
+
 	* pt-mat.cc (tm_row_const::empty): New function.
 	(tm_const::init): Don't append anything if tmp tm_row_const object
 	is empty.
--- a/src/load-save.cc	Tue Dec 05 19:45:58 2006 +0000
+++ b/src/load-save.cc	Tue Dec 05 21:49:45 2006 +0000
@@ -360,6 +360,7 @@
     retval = LS_BINARY;
   else
     {
+      file.clear ();
       file.seekg (0, std::ios::beg);
 
       int32_t mopt, nr, nc, imag, len;
--- a/src/ls-oct-ascii.cc	Tue Dec 05 19:45:58 2006 +0000
+++ b/src/ls-oct-ascii.cc	Tue Dec 05 21:49:45 2006 +0000
@@ -121,6 +121,11 @@
 	    }
 	  else if (next_only)
 	    break;
+	  else
+	    {
+	      while (is.get (c) && c != '\n')
+		; // Skip to end of line.
+	    }
 	}
     }