Mercurial > octave-nkf
changeset 4402:868983234164
[project @ 2003-05-01 19:24:47 by jwe]
author | jwe |
---|---|
date | Thu, 01 May 2003 19:24:47 +0000 |
parents | 018fb50a84e9 |
children | f52b3f1a9399 |
files | src/ChangeLog src/load-save.cc |
diffstat | 2 files changed, 15 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Thu May 01 16:48:48 2003 +0000 +++ b/src/ChangeLog Thu May 01 19:24:47 2003 +0000 @@ -2,6 +2,7 @@ * load-save.cc (save_ascii_data): If saving a range with non-integer base, limit, or increment, save as matrix instead. + (get_save_type): Avoid unsigned types. 2003-04-30 John W. Eaton <jwe@bevo.che.wisc.edu>
--- a/src/load-save.cc Thu May 01 16:48:48 2003 +0000 +++ b/src/load-save.cc Thu May 01 19:24:47 2003 +0000 @@ -3484,7 +3484,7 @@ if (open) return true; continue; - + case '\\': if (i == len - 1) return false; @@ -3505,13 +3505,19 @@ { save_type st = LS_DOUBLE; - if (max_val < 256 && min_val > -1) - st = LS_U_CHAR; - else if (max_val < 65536 && min_val > -1) - st = LS_U_SHORT; - else if (max_val < 4294967295UL && min_val > -1) - st = LS_U_INT; - else if (max_val < 128 && min_val >= -128) + // Matlab doesn't seem to load the UINT32 type correctly, so let's + // avoid it (and the other unsigned types, even though they may not + // have the same problem. + + // if (max_val < 256 && min_val > -1) + // st = LS_U_CHAR; + // else if (max_val < 65536 && min_val > -1) + // st = LS_U_SHORT; + // else if (max_val < 4294967295UL && min_val > -1) + // st = LS_U_INT; + // else + + if (max_val < 128 && min_val >= -128) st = LS_CHAR; else if (max_val < 32768 && min_val >= -32768) st = LS_SHORT;