- m_input->Read(buf, 10);
- return wxConvertFromIeeeExtended((const wxInt8 *)buf);
-#else
- return 0.0;
-#endif
+ m_input->Read(buf, 10);
+ return wxConvertFromIeeeExtended((const wxInt8 *)buf);
+ }
+ else
+#endif // wxUSE_APPLE_IEEE
+ {
+ Float64Data floatData;
+
+ if ( m_be_order == (wxBYTE_ORDER == wxBIG_ENDIAN) )
+ {
+ floatData.i[0] = Read32();
+ floatData.i[1] = Read32();
+ }
+ else
+ {
+ floatData.i[1] = Read32();
+ floatData.i[0] = Read32();
+ }
+
+ return static_cast<double>(floatData.f);
+ }
+}
+
+float wxDataInputStream::ReadFloat()
+{
+#if wxUSE_APPLE_IEEE
+ if ( m_useExtendedPrecision )
+ {
+ return (float)ReadDouble();
+ }
+ else
+#endif // wxUSE_APPLE_IEEE
+ {
+ Float32Data floatData;
+
+ floatData.i = Read32();
+ return static_cast<float>(floatData.f);
+ }