Mercurial > hg > octave-nkf
changeset 4467:78046131cc16
[project @ 2003-07-15 14:28:10 by jwe]
author | jwe |
---|---|
date | Tue, 15 Jul 2003 14:28:10 +0000 |
parents | b18007283045 |
children | efb6301dae80 |
files | src/ChangeLog src/load-save.cc |
diffstat | 2 files changed, 16 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2003-07-15 John W. Eaton <jwe@bevo.che.wisc.edu> + * load-save.cc (read_mat5_binary_element): Correctly read struct + arrays. + * pt-misc.cc (tree_parameter_list::initialize_undefined_elements): New args, warnfor and nargout. Change all callers. (symbols_of_pt_misc): New function.
--- a/src/load-save.cc +++ b/src/load-save.cc @@ -2675,7 +2675,7 @@ name[len] = '\0'; retval = name; - } + } if (dimension_length != 8) { @@ -2773,19 +2773,25 @@ goto data_read_error; } - octave_value_list field_elts (n, Matrix ()); + Cell field_elts (n_fields, n); // fields subelements - for (i = 0; i < n_fields; i++) + for (int j = 0; j < n; j++) { - for (int j = 0; j < n; j++) + for (i = 0; i < n_fields; i++) { octave_value fieldtc; read_mat5_binary_element (is, filename, swap, global, fieldtc); - field_elts(j) = fieldtc; + field_elts(i,j) = fieldtc; } - - m.assign (elname + i*field_name_length, field_elts); + } + + for (int i = n_fields-1; i >= 0; i--) + { + const char *key = elname + i*field_name_length; + + for (int j = n-1; j >=0; j--) + m[key](j) = field_elts(i,j); } tc = m;