Mercurial > hg > octave-lyh
changeset 16427:1df815271885
allow various types of int for names like ML
author | Ed Meyer <eem2314@gmail.com> |
---|---|
date | Wed, 03 Apr 2013 19:04:08 -0700 |
parents | ad070b353e59 |
children | f016a5342e19 |
files | libinterp/interp-core/ls-mat5.cc |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/interp-core/ls-mat5.cc +++ b/libinterp/interp-core/ls-mat5.cc @@ -82,6 +82,7 @@ #endif #define PAD(l) (((l) > 0 && (l) <= 4) ? 4 : (((l)+7)/8)*8) +#define INT8(l) ((l) == miINT8 || (l) == miUINT8 || (l) == miUTF8) // The subsystem data block @@ -674,7 +675,7 @@ dims(1) = 1; } - if (read_mat5_tag (is, swap, type, len) || type != miINT8) + if (read_mat5_tag (is, swap, type, len) || !INT8(type)) { error ("load: invalid array name subelement"); goto early_read_error; @@ -1059,7 +1060,7 @@ { int32_t fn_type; int32_t fn_len; - if (read_mat5_tag (is, swap, fn_type, fn_len) || fn_type != miINT8) + if (read_mat5_tag (is, swap, fn_type, fn_len) || !INT8(fn_type)) { error ("load: invalid field name subelement"); goto data_read_error; @@ -1120,7 +1121,7 @@ { isclass = true; - if (read_mat5_tag (is, swap, type, len) || type != miINT8) + if (read_mat5_tag (is, swap, type, len) || !INT8(type)) { error ("load: invalid class name"); goto skip_ahead; @@ -1170,7 +1171,7 @@ // field name subelement. The length of this subelement tells // us how many fields there are. - if (read_mat5_tag (is, swap, fn_type, fn_len) || fn_type != miINT8) + if (read_mat5_tag (is, swap, fn_type, fn_len) || !INT8(fn_type)) { error ("load: invalid field name subelement"); goto data_read_error;