Mercurial > hg > octave-nkf
changeset 6897:935d23e16951
[project @ 2007-09-13 19:13:56 by jwe]
author | jwe |
---|---|
date | Thu, 13 Sep 2007 19:13:56 +0000 |
parents | 5c9c49c51302 |
children | f4e1bdb66535 |
files | liboctave/ChangeLog liboctave/lo-utils.cc |
diffstat | 2 files changed, 16 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,9 @@ +2007-09-13 John W. Eaton <jwe@octave.org> + + * lo-utils.cc (read_inf_nan_na, octave_read_double, + octave_read_complex): Use istream::get instead of >> to read + individual characters. + 2007-09-10 John W. Eaton <jwe@octave.org> * Array.cc (assign1): Don't call make_unique for invalid assignment.
--- a/liboctave/lo-utils.cc +++ b/liboctave/lo-utils.cc @@ -217,10 +217,10 @@ { case 'i': case 'I': { - is >> c; + c = is.get (); if (c == 'n' || c == 'N') { - is >> c; + c = is.get (); if (c == 'f' || c == 'F') d = sign == '-' ? -octave_Inf : octave_Inf; else @@ -233,10 +233,10 @@ case 'n': case 'N': { - is >> c; + c = is.get (); if (c == 'a' || c == 'A') { - is >> c; + c = is.get (); if (c == 'n' || c == 'N') d = octave_NaN; else @@ -264,13 +264,13 @@ char c1 = 0; - is >> c1; + c1 = is.get (); switch (c1) { case '-': { char c2 = 0; - is >> c2; + c2 = is.get (); if (c2 == 'i' || c2 == 'I') d = read_inf_nan_na (is, c2, c1); else @@ -285,7 +285,7 @@ case '+': { char c2 = 0; - is >> c2; + c2 = is.get (); if (c2 == 'i' || c2 == 'I') d = read_inf_nan_na (is, c2, c1); else @@ -319,17 +319,17 @@ char ch = 0; - is >> ch; + ch = is.get (); if (ch == '(') { re = octave_read_double (is); - is >> ch; + ch = is.get (); if (ch == ',') { im = octave_read_double (is); - is >> ch; + ch = is.get (); if (ch == ')') cx = Complex (re, im);