compilation fixes for non default wxUSE_XXX values (patch 662781)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-01-12 22:20:46 +00:00
parent 12c44eb56d
commit e30285abc6
28 changed files with 154 additions and 84 deletions

View File

@@ -475,6 +475,7 @@ bool wxAppBase::CheckBuildOptions(const wxBuildOptions& opts)
static void LINKAGEMODE SetTraceMasks()
{
#if wxUSE_LOG
wxString mask;
if ( wxGetEnv(wxT("WXTRACE"), &mask) )
{
@@ -482,6 +483,7 @@ static void LINKAGEMODE SetTraceMasks()
while ( tkn.HasMoreTokens() )
wxLog::AddTraceMask(tkn.GetNextToken());
}
#endif // wxUSE_LOG
}
// wxASSERT() helper

View File

@@ -20,7 +20,7 @@
#pragma hdrstop
#endif
#if wxUSE_MDI_ARCHITECTURE && wxUSE_DOC_VIEW_ARCHITECTURE
#if wxUSE_MDI_ARCHITECTURE
#include "wx/docmdi.h"

View File

@@ -894,7 +894,7 @@ wxList *wxFTP::GetList(const wxString& wildcard, bool details)
{
wxSocketBase *sock = GetPort();
if (!sock)
return FALSE;
return NULL;
wxList *file_list = new wxList;
wxString line;
// NLST : List of Filenames (including Directory's !)

View File

@@ -152,6 +152,7 @@ void wxRect2DDouble::ConstrainTo( const wxRect2DDouble &rect )
// wxPoint2D
#if wxUSE_STREAMS
void wxPoint2DInt::WriteTo( wxDataOutputStream &stream ) const
{
stream.Write32( m_x );
@@ -163,6 +164,7 @@ void wxPoint2DInt::ReadFrom( wxDataInputStream &stream )
m_x = stream.Read32();
m_y = stream.Read32();
}
#endif // wxUSE_STREAMS
wxDouble wxPoint2DInt::GetVectorAngle() const
{
@@ -338,6 +340,7 @@ wxRect2DInt& wxRect2DInt::operator=( const wxRect2DInt &r )
return *this;
}
#if wxUSE_STREAMS
void wxRect2DInt::WriteTo( wxDataOutputStream &stream ) const
{
stream.Write32( m_x );
@@ -353,5 +356,6 @@ void wxRect2DInt::ReadFrom( wxDataInputStream &stream )
m_width = stream.Read32();
m_height = stream.Read32();
}
#endif // wxUSE_STREAMS
#endif // wxUSE_GEOMETRY

View File

@@ -20,7 +20,7 @@
#include "wx/defs.h"
#if wxUSE_IMAGE && wxUSE_STREAMS
#if wxUSE_IMAGE
#include "wx/imagbmp.h"
#include "wx/bitmap.h"
@@ -52,6 +52,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxBMPHandler,wxImageHandler)
#if wxUSE_STREAMS
#ifndef BI_RGB
#define BI_RGB 0
#define BI_RLE8 1
@@ -964,6 +966,8 @@ bool wxBMPHandler::DoCanRead(wxInputStream& stream)
return hdr[0] == 'B' && hdr[1] == 'M';
}
#endif // wxUSE_STREAMS
#if wxUSE_ICO_CUR
//-----------------------------------------------------------------------------
@@ -972,6 +976,8 @@ bool wxBMPHandler::DoCanRead(wxInputStream& stream)
IMPLEMENT_DYNAMIC_CLASS(wxICOHandler, wxBMPHandler)
#if wxUSE_STREAMS
struct ICONDIRENTRY
{
wxUint8 bWidth; // Width of the image
@@ -1288,6 +1294,7 @@ bool wxICOHandler::DoCanRead(wxInputStream& stream)
return hdr[0] == '\0' && hdr[1] == '\0' && hdr[2] == '\1' && hdr[3] == '\0';
}
#endif // wxUSE_STREAMS
//-----------------------------------------------------------------------------
@@ -1296,6 +1303,8 @@ bool wxICOHandler::DoCanRead(wxInputStream& stream)
IMPLEMENT_DYNAMIC_CLASS(wxCURHandler, wxICOHandler)
#if wxUSE_STREAMS
bool wxCURHandler::DoCanRead(wxInputStream& stream)
{
stream.SeekI(0);
@@ -1307,12 +1316,16 @@ bool wxCURHandler::DoCanRead(wxInputStream& stream)
return hdr[0] == '\0' && hdr[1] == '\0' && hdr[2] == '\2' && hdr[3] == '\0';
}
#endif // wxUSE_STREAMS
//-----------------------------------------------------------------------------
// wxANIHandler
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxANIHandler, wxCURHandler)
#if wxUSE_STREAMS
bool wxANIHandler::LoadFile(wxImage *image, wxInputStream& stream,
bool verbose, int index)
{
@@ -1470,6 +1483,8 @@ int wxANIHandler::GetImageCount(wxInputStream& stream)
return wxNOT_FOUND;
}
#endif // wxUSE_STREAMS
#endif // wxUSE_ICO_CUR
#endif // wxUSE_IMAGE && wxUSE_STREAMS
#endif // wxUSE_IMAGE

View File

@@ -23,7 +23,7 @@
# include "wx/defs.h"
#endif
#if wxUSE_IMAGE && wxUSE_STREAMS && wxUSE_PCX
#if wxUSE_IMAGE && wxUSE_PCX
#include "wx/imagpcx.h"
#include "wx/wfstream.h"
@@ -35,6 +35,14 @@
#include "wx/list.h"
#include "wx/object.h"
//-----------------------------------------------------------------------------
// wxPCXHandler
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxPCXHandler,wxImageHandler)
#if wxUSE_STREAMS
//-----------------------------------------------------------------------------
// RLE encoding and decoding
//-----------------------------------------------------------------------------
@@ -429,8 +437,6 @@ int SavePCX(wxImage *image, wxOutputStream& stream)
// wxPCXHandler
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxPCXHandler,wxImageHandler)
bool wxPCXHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose, int WXUNUSED(index) )
{
int error;
@@ -494,5 +500,7 @@ bool wxPCXHandler::DoCanRead( wxInputStream& stream )
return c == 10;
}
#endif // wxUSE_STREAMS && wxUSE_PCX
#endif // wxUSE_STREAMS
#endif // wxUSE_IMAGE && wxUSE_PCX

View File

@@ -54,7 +54,7 @@
IMPLEMENT_DYNAMIC_CLASS(wxPNGHandler,wxImageHandler)
#if wxUSE_LIBPNG
#if wxUSE_STREAMS
#ifndef PNGLINKAGEMODE
#ifdef __WATCOMC__

View File

@@ -47,6 +47,8 @@ extern "C"
IMPLEMENT_DYNAMIC_CLASS(wxTIFFHandler,wxImageHandler)
#if wxUSE_STREAMS
extern "C"
{
@@ -377,8 +379,7 @@ bool wxTIFFHandler::DoCanRead( wxInputStream& stream )
(hdr[0] == 'M' && hdr[1] == 'M');
}
#endif // wxUSE_STREAMS
#endif
// wxUSE_LIBTIFF
#endif // wxUSE_LIBTIFF

View File

@@ -1069,6 +1069,7 @@ wxString wxGetCurrentDir()
// wxDoExecuteWithCapture() helper: reads an entire stream into one array
//
// returns TRUE if ok, FALSE if error
#if wxUSE_STREAMS
static bool ReadAll(wxInputStream *is, wxArrayString& output)
{
wxCHECK_MSG( is, FALSE, _T("NULL stream in wxExecute()?") );
@@ -1097,6 +1098,7 @@ static bool ReadAll(wxInputStream *is, wxArrayString& output)
return cont;
}
#endif // wxUSE_STREAMS
// this is a private function because it hasn't a clean interface: the first
// array is passed by reference, the second by pointer - instead we have 2

View File

@@ -1177,7 +1177,9 @@ bool wxWindowBase::TransferDataToWindow()
if ( validator && !validator->TransferToWindow() )
{
wxLogWarning(_("Could not transfer data to window"));
#if wxUSE_LOG
wxLog::FlushActive();
#endif // wxUSE_LOG
return FALSE;
}