added wxConvertTo/FromIeeeExtended() synonyms for ConvertTo/FromIeeeExtended() and deprecated the latters; also added missing dll export declarations for them (patch 1772233)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -132,8 +132,15 @@
 | 
				
			|||||||
    extern "C" {
 | 
					    extern "C" {
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
    /* functions from common/extended.c */
 | 
					    /* functions from common/extended.c */
 | 
				
			||||||
    extern wxFloat64 ConvertFromIeeeExtended(const wxInt8 *bytes);
 | 
					    WXDLLEXPORT wxFloat64 wxConvertFromIeeeExtended(const wxInt8 *bytes);
 | 
				
			||||||
    extern void ConvertToIeeeExtended(wxFloat64 num, wxInt8 *bytes);
 | 
					    WXDLLEXPORT void wxConvertToIeeeExtended(wxFloat64 num, wxInt8 *bytes);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /* use wxConvertFromIeeeExtended() and wxConvertToIeeeExtended() instead */
 | 
				
			||||||
 | 
					#if WXWIN_COMPATIBILITY_2_8
 | 
				
			||||||
 | 
					    wxDEPRECATED( WXDLLEXPORT wxFloat64 ConvertFromIeeeExtended(const wxInt8 *bytes) );
 | 
				
			||||||
 | 
					    wxDEPRECATED( WXDLLEXPORT void ConvertToIeeeExtended(wxFloat64 num, wxInt8 *bytes) );
 | 
				
			||||||
 | 
					#endif // WXWIN_COMPATIBILITY_2_8
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef __cplusplus
 | 
					#ifdef __cplusplus
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -92,7 +92,7 @@ double wxDataInputStream::ReadDouble()
 | 
				
			|||||||
  char buf[10];
 | 
					  char buf[10];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  m_input->Read(buf, 10);
 | 
					  m_input->Read(buf, 10);
 | 
				
			||||||
  return ConvertFromIeeeExtended((const wxInt8 *)buf);
 | 
					  return wxConvertFromIeeeExtended((const wxInt8 *)buf);
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
  return 0.0;
 | 
					  return 0.0;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
@@ -529,7 +529,7 @@ void wxDataOutputStream::WriteDouble(double d)
 | 
				
			|||||||
  char buf[10];
 | 
					  char buf[10];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if wxUSE_APPLE_IEEE
 | 
					#if wxUSE_APPLE_IEEE
 | 
				
			||||||
  ConvertToIeeeExtended(d, (wxInt8 *)buf);
 | 
					  wxConvertToIeeeExtended(d, (wxInt8 *)buf);
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
#if !defined(__VMS__) && !defined(__GNUG__)
 | 
					#if !defined(__VMS__) && !defined(__GNUG__)
 | 
				
			||||||
# pragma warning "wxDataOutputStream::WriteDouble() not using IeeeExtended - will not work!"
 | 
					# pragma warning "wxDataOutputStream::WriteDouble() not using IeeeExtended - will not work!"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -105,7 +105,7 @@
 | 
				
			|||||||
 * and a 64-bit mantissa, with no hidden bit.
 | 
					 * and a 64-bit mantissa, with no hidden bit.
 | 
				
			||||||
 ****************************************************************/
 | 
					 ****************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
wxFloat64 ConvertFromIeeeExtended(const wxInt8 *bytes)
 | 
					WXDLLEXPORT wxFloat64 wxConvertFromIeeeExtended(const wxInt8 *bytes)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    wxFloat64 f;
 | 
					    wxFloat64 f;
 | 
				
			||||||
    wxInt32 expon;
 | 
					    wxInt32 expon;
 | 
				
			||||||
@@ -145,7 +145,7 @@ wxFloat64 ConvertFromIeeeExtended(const wxInt8 *bytes)
 | 
				
			|||||||
/****************************************************************/
 | 
					/****************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void ConvertToIeeeExtended(wxFloat64 num, wxInt8 *bytes)
 | 
					WXDLLEXPORT void wxConvertToIeeeExtended(wxFloat64 num, wxInt8 *bytes)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    wxInt32 sign;
 | 
					    wxInt32 sign;
 | 
				
			||||||
    wxInt32 expon;
 | 
					    wxInt32 expon;
 | 
				
			||||||
@@ -191,6 +191,16 @@ void ConvertToIeeeExtended(wxFloat64 num, wxInt8 *bytes)
 | 
				
			|||||||
    bytes[9] = loMant;
 | 
					    bytes[9] = loMant;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if WXWIN_COMPATIBILITY_2_8
 | 
				
			||||||
 | 
					WXDLLEXPORT wxFloat64 ConvertFromIeeeExtended(const wxInt8 *bytes)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    return wxConvertFromIeeeExtended(bytes);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					WXDLLEXPORT void ConvertToIeeeExtended(wxFloat64 num, wxInt8 *bytes)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    wxConvertToIeeeExtended(num, bytes);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#endif // WXWIN_COMPATIBILITY_2_8
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* wxUSE_APPLE_IEEE */
 | 
					#endif /* wxUSE_APPLE_IEEE */
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user