changeset 4427:8040775cf0a9

[project @ 2003-06-14 21:43:37 by jwe]
author jwe
date Sat, 14 Jun 2003 21:43:37 +0000
parents 51a0dcde8778
children 067160691cc9
files src/ChangeLog src/load-save.cc
diffstat 2 files changed, 15 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Jun 13 19:16:38 2003 +0000
+++ b/src/ChangeLog	Sat Jun 14 21:43:37 2003 +0000
@@ -1,3 +1,8 @@
+2003-06-14  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* load-save.cc (get_save_type): Avoid all save types other than
+	LS_DOUBLE to avoid apparent Matlab bugs.
+
 2003-06-13  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* parse.y (frob_function, parse_fcn_file): Handle help_buf as
--- a/src/load-save.cc	Fri Jun 13 19:16:38 2003 +0000
+++ b/src/load-save.cc	Sat Jun 14 21:43:37 2003 +0000
@@ -3507,7 +3507,10 @@
 
   // 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.
+  // have the same problem.  And apparently, there are problems with
+  // other smaller types as well.  If we avoid them all, then maybe we
+  // will avoid problems.  Unfortunately, we won't be able to save
+  // space...
 
   //  if (max_val < 256 && min_val > -1)
   //    st = LS_U_CHAR;
@@ -3515,14 +3518,12 @@
   //    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;
-  else if (max_val <= 2147483647L && min_val >= -2147483647L)
-    st = LS_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 <= 2147483647L && min_val >= -2147483647L)
+  //    st = LS_INT;
 
   return st;
 }