Mercurial > hg > octave-terminal
changeset 618:ca6e72746161
[project @ 1994-08-15 04:44:32 by jwe]
author | jwe |
---|---|
date | Mon, 15 Aug 1994 04:44:32 +0000 |
parents | 5acc6db54c8f |
children | 8778be2e70e7 |
files | src/load-save.cc |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/load-save.cc +++ b/src/load-save.cc @@ -437,6 +437,14 @@ LS_DO_READ (unsigned TWO_BYTE_INT, data, 2, len, is); break; + case LS_U_INT: + LS_DO_READ (unsigned FOUR_BYTE_INT, data, 4, len, is); + break; + + case LS_CHAR: + LS_DO_READ (signed char, data, 1, len, is); + break; + case LS_SHORT: LS_DO_READ (TWO_BYTE_INT, data, 2, len, is); break; @@ -1879,6 +1887,9 @@ return 0; } +// MAX_VAL and MIN_VAL are assumed to have integral values even though +// they are stored in doubles. + static save_type get_save_type (double max_val, double min_val) { @@ -1888,6 +1899,10 @@ st = LS_U_CHAR; else if (max_val < 65536 && min_val > -1) st = LS_U_SHORT; + else if (max_val < 4294967295 && 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; else if (max_val < 2147483648 && min_val > -2147483648)