Corrections for future OW 1.4. Warning fixes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-07-26 09:05:27 +00:00
parent e4592d6028
commit c40158e40b
6 changed files with 106 additions and 92 deletions

View File

@@ -573,7 +573,7 @@ typedef int wxWindowID;
#define except(x) catch(...) #define except(x) catch(...)
#endif /* Metrowerks */ #endif /* Metrowerks */
#if defined(__WATCOMC__) #if defined(__WATCOMC__) && (__WATCOMC__ < 1240)
typedef short mode_t; typedef short mode_t;
#endif #endif
@@ -963,6 +963,9 @@ inline void *wxUIntToPtr(wxUIntPtr p)
#if defined(__PALMOS__) && !defined(HAVE_SSIZE_T) #if defined(__PALMOS__) && !defined(HAVE_SSIZE_T)
#define HAVE_SSIZE_T #define HAVE_SSIZE_T
#endif #endif
#if defined(__WATCOMC__) && __WATCOMC__ > 1230
#define HAVE_SSIZE_T
#endif
#ifndef HAVE_SSIZE_T #ifndef HAVE_SSIZE_T
#if SIZEOF_SIZE_T == 4 #if SIZEOF_SIZE_T == 4
typedef wxInt32 ssize_t; typedef wxInt32 ssize_t;

View File

@@ -80,8 +80,6 @@ class WXDLLEXPORT wxMetafile: public wxGDIObject
{ return m_refData == metafile.m_refData; } { return m_refData == metafile.m_refData; }
inline bool operator!= (const wxMetafile& metafile) const inline bool operator!= (const wxMetafile& metafile) const
{ return m_refData != metafile.m_refData; } { return m_refData != metafile.m_refData; }
protected:
}; };
class WXDLLEXPORT wxMetafileDC: public wxDC class WXDLLEXPORT wxMetafileDC: public wxDC
@@ -104,7 +102,7 @@ class WXDLLEXPORT wxMetafileDC: public wxDC
virtual void SetMapMode(int mode); virtual void SetMapMode(int mode);
virtual void GetTextExtent(const wxString& string, long *x, long *y, virtual void GetTextExtent(const wxString& string, long *x, long *y,
long *descent = NULL, long *externalLeading = NULL, long *descent = NULL, long *externalLeading = NULL,
wxFont *theFont = NULL, bool use16bit = FALSE) const; wxFont *theFont = NULL, bool use16bit = false) const;
// Implementation // Implementation
inline wxMetafile *GetMetaFile(void) const { return m_metaFile; } inline wxMetafile *GetMetaFile(void) const { return m_metaFile; }
@@ -117,7 +115,9 @@ protected:
wxMetafile* m_metaFile; wxMetafile* m_metaFile;
private: private:
#ifndef __WATCOMC__
// function hiding warning supression // function hiding warning supression
// still required ??
inline virtual void GetTextExtent( const wxString& string inline virtual void GetTextExtent( const wxString& string
,long* width ,long* width
,long* height ,long* height
@@ -125,7 +125,8 @@ private:
,long* externalLeading = NULL ,long* externalLeading = NULL
,wxFont* theFont = NULL ,wxFont* theFont = NULL
) const ) const
{ GetTextExtent( string, width, height, descent, externalLeading, theFont, FALSE);}; { GetTextExtent( string, width, height, descent, externalLeading, theFont, false);};
#endif
}; };
/* /*
@@ -140,7 +141,14 @@ private:
bool WXDLLEXPORT wxMakeMetafilePlaceable(const wxString& filename, float scale = 1.0); bool WXDLLEXPORT wxMakeMetafilePlaceable(const wxString& filename, float scale = 1.0);
// Optional origin and extent // Optional origin and extent
bool WXDLLEXPORT wxMakeMetaFilePlaceable(const wxString& filename, int x1, int y1, int x2, int y2, float scale = 1.0, bool useOriginAndExtent = TRUE); bool WXDLLEXPORT wxMakeMetaFilePlaceable( const wxString& filename
,int x1
,int y1
,int x2
,int y2
,float scale = 1.0
,bool useOriginAndExtent = true
);
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxMetafileDataObject is a specialization of wxDataObject for metafile data // wxMetafileDataObject is a specialization of wxDataObject for metafile data
@@ -155,8 +163,10 @@ class WXDLLEXPORT wxMetafileDataObject : public wxDataObject
public: public:
// ctors // ctors
wxMetafileDataObject() { m_width = 0; m_height = 0; }; wxMetafileDataObject() { m_width = 0; m_height = 0; };
wxMetafileDataObject(const wxMetafile& metafile, int width = 0, int height = 0): wxMetafileDataObject(const wxMetafile& metafile, int width = 0,int height = 0)
m_metafile(metafile), m_width(width), m_height(height) { } :m_metafile(metafile)
,m_width(width)
,m_height(height) { }
void SetMetafile(const wxMetafile& metafile, int w = 0, int h = 0) void SetMetafile(const wxMetafile& metafile, int w = 0, int h = 0)
{ m_metafile = metafile; m_width = w; m_height = h; } { m_metafile = metafile; m_width = w; m_height = h; }
@@ -188,4 +198,3 @@ private:
#endif // wxUSE_METAFILE #endif // wxUSE_METAFILE
#endif #endif
// _WX_METAFIILE_H_ // _WX_METAFIILE_H_

View File

@@ -939,8 +939,6 @@
// 0 for no interprocess comms // 0 for no interprocess comms
#define wxUSE_HELP 1 #define wxUSE_HELP 1
// 0 for no help facility // 0 for no help facility
#define wxUSE_MS_HTML_HELP 1
// 0 for no MS HTML Help
// Use wxHTML-based help controller? // Use wxHTML-based help controller?
#define wxUSE_WXHTML_HELP 0 #define wxUSE_WXHTML_HELP 0

View File

@@ -546,7 +546,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
while ((*d++ = *s) != 0) { while ((*d++ = *s) != 0) {
# ifndef __WXMSW__ # ifndef __WXMSW__
if (*s == wxT('\\')) { if (*s == wxT('\\')) {
if ((*(d - 1) = *++s)) { if ((*(d - 1) = *++s)!=0) {
s++; s++;
continue; continue;
} else } else

View File

@@ -109,7 +109,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPNGHandler,wxImageHandler)
#if wxUSE_STREAMS #if wxUSE_STREAMS
#ifndef PNGLINKAGEMODE #ifndef PNGLINKAGEMODE
#if defined(__WATCOMC__) && defined(__WXMSW__) #if defined(__WATCOMC__) && ( defined(__WXMSW__) || __WATCOMC__ > 1230 )
// we need an explicit cdecl for Watcom, at least according to // we need an explicit cdecl for Watcom, at least according to
// //
// http://sf.net/tracker/index.php?func=detail&aid=651492&group_id=9863&atid=109863 // http://sf.net/tracker/index.php?func=detail&aid=651492&group_id=9863&atid=109863

View File

@@ -26,6 +26,10 @@
#include "wx/setup.h" #include "wx/setup.h"
#endif #endif
#ifndef WXUNUSED
#define WXUNUSED(x)
#endif
#if defined(__VISAGECPP__) #if defined(__VISAGECPP__)
/* Seems to be needed by Visual Age C++, though I don't see how it manages /* Seems to be needed by Visual Age C++, though I don't see how it manages
to not break on including a C++ header into a plain C source file */ to not break on including a C++ header into a plain C source file */
@@ -225,17 +229,17 @@ void GSocketGUIFunctionsTableNull::OnExit()
{} {}
bool GSocketGUIFunctionsTableNull::CanUseEventLoop() bool GSocketGUIFunctionsTableNull::CanUseEventLoop()
{ return false; } { return false; }
bool GSocketGUIFunctionsTableNull::Init_Socket(GSocket *socket) bool GSocketGUIFunctionsTableNull::Init_Socket(GSocket *WXUNUSED(socket))
{ return true; } { return true; }
void GSocketGUIFunctionsTableNull::Destroy_Socket(GSocket *socket) void GSocketGUIFunctionsTableNull::Destroy_Socket(GSocket *WXUNUSED(socket))
{} {}
void GSocketGUIFunctionsTableNull::Install_Callback(GSocket *socket, GSocketEvent event) void GSocketGUIFunctionsTableNull::Install_Callback(GSocket *WXUNUSED(socket), GSocketEvent WXUNUSED(event))
{} {}
void GSocketGUIFunctionsTableNull::Uninstall_Callback(GSocket *socket, GSocketEvent event) void GSocketGUIFunctionsTableNull::Uninstall_Callback(GSocket *WXUNUSED(socket), GSocketEvent WXUNUSED(event))
{} {}
void GSocketGUIFunctionsTableNull::Enable_Events(GSocket *socket) void GSocketGUIFunctionsTableNull::Enable_Events(GSocket *WXUNUSED(socket))
{} {}
void GSocketGUIFunctionsTableNull::Disable_Events(GSocket *socket) void GSocketGUIFunctionsTableNull::Disable_Events(GSocket *WXUNUSED(socket))
{} {}
/* Global initialisers */ /* Global initialisers */