Mercurial > hg > octave-lojdl
changeset 2121:bc6ecd8f1175
[project @ 1996-05-12 06:45:55 by jwe]
author | jwe |
---|---|
date | Sun, 12 May 1996 06:45:55 +0000 |
parents | 6b3a4558a935 |
children | 91d802f77456 |
files | src/oct-stream.cc |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/oct-stream.cc +++ b/src/oct-stream.cc @@ -855,7 +855,7 @@ { mval.resize (nr, 32, 0.0); data = mval.fortran_vec (); - max_size = nr * nc; + max_size = nr * 32; } } else @@ -1000,7 +1000,7 @@ if (ok ()) { - mval.resize (final_nr, final_nc); + mval.resize (final_nr, final_nc, 0.0); retval = mval; } @@ -1048,7 +1048,7 @@ max_size *= 2; \ \ if (nr > 0) \ - mval.resize (nr, max_size / 2, 0.0); \ + mval.resize (nr, max_size / nr, 0.0); \ else \ mval.resize (max_size, 1, 0.0); \ \ @@ -1065,6 +1065,8 @@ octave_base_stream::do_scanf (scanf_format_list& fmt_list, int nr, int nc, int& count) { + count = 0; + octave_value retval = Matrix (); istream *isp = input_stream (); @@ -1090,7 +1092,7 @@ { mval.resize (nr, 32, 0.0); data = mval.fortran_vec (); - max_size = nr * nc; + max_size = nr * 32; } } else @@ -1239,7 +1241,7 @@ if (ok ()) { - mval.resize (final_nr, final_nc); + mval.resize (final_nr, final_nc, 0.0); if (all_char_conv) {