Work on system file library.
[pspp] / utilities / pspp-dump-sav.c
index ba5a0c9045c3c78734c2386bf897e08c66b963cb..d08999e01b673984a4af349c5d862783fea17bf3 100644 (file)
@@ -318,6 +318,19 @@ read_header (struct sfm_reader *r)
       else
         r->float_format = FLOAT_IEEE_DOUBLE_LE;
     }
+  if ((r->integer_format == INTEGER_MSB_FIRST && r->float_format != FLOAT_IEEE_DOUBLE_BE) ||
+      (r->integer_format == INTEGER_LSB_FIRST && r->float_format != FLOAT_IEEE_DOUBLE_LE)) 
+    {
+      printf ("unexpected floating-point format\n");
+    }
+
+  if (r->float_format != FLOAT_IEEE_DOUBLE_LE && r->float_format != FLOAT_IEEE_DOUBLE_BE)
+    {
+      printf ("non-IEEE format\n");
+    } else
+    {
+      printf ("IEEE format\n");
+    }
   r->bias = float_get_double (r->float_format, raw_bias);
 
   read_string (r, creation_date, sizeof creation_date);