Mercurial > octave-nkf
comparison src/load-save.cc @ 4427:8040775cf0a9
[project @ 2003-06-14 21:43:37 by jwe]
author | jwe |
---|---|
date | Sat, 14 Jun 2003 21:43:37 +0000 |
parents | 3dfdbcaf4582 |
children | e2c91da0aa16 |
comparison
equal
deleted
inserted
replaced
4426:51a0dcde8778 | 4427:8040775cf0a9 |
---|---|
3505 { | 3505 { |
3506 save_type st = LS_DOUBLE; | 3506 save_type st = LS_DOUBLE; |
3507 | 3507 |
3508 // Matlab doesn't seem to load the UINT32 type correctly, so let's | 3508 // Matlab doesn't seem to load the UINT32 type correctly, so let's |
3509 // avoid it (and the other unsigned types, even though they may not | 3509 // avoid it (and the other unsigned types, even though they may not |
3510 // have the same problem. | 3510 // have the same problem. And apparently, there are problems with |
3511 // other smaller types as well. If we avoid them all, then maybe we | |
3512 // will avoid problems. Unfortunately, we won't be able to save | |
3513 // space... | |
3511 | 3514 |
3512 // if (max_val < 256 && min_val > -1) | 3515 // if (max_val < 256 && min_val > -1) |
3513 // st = LS_U_CHAR; | 3516 // st = LS_U_CHAR; |
3514 // else if (max_val < 65536 && min_val > -1) | 3517 // else if (max_val < 65536 && min_val > -1) |
3515 // st = LS_U_SHORT; | 3518 // st = LS_U_SHORT; |
3516 // else if (max_val < 4294967295UL && min_val > -1) | 3519 // else if (max_val < 4294967295UL && min_val > -1) |
3517 // st = LS_U_INT; | 3520 // st = LS_U_INT; |
3518 // else | 3521 // else if (max_val < 128 && min_val >= -128) |
3519 | 3522 // st = LS_CHAR; |
3520 if (max_val < 128 && min_val >= -128) | 3523 // else if (max_val < 32768 && min_val >= -32768) |
3521 st = LS_CHAR; | 3524 // st = LS_SHORT; |
3522 else if (max_val < 32768 && min_val >= -32768) | 3525 // else if (max_val <= 2147483647L && min_val >= -2147483647L) |
3523 st = LS_SHORT; | 3526 // st = LS_INT; |
3524 else if (max_val <= 2147483647L && min_val >= -2147483647L) | |
3525 st = LS_INT; | |
3526 | 3527 |
3527 return st; | 3528 return st; |
3528 } | 3529 } |
3529 | 3530 |
3530 // Save the data from TC along with the corresponding NAME, help | 3531 // Save the data from TC along with the corresponding NAME, help |