_MSC_VER => __VISUALC__ change
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1580 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -21,27 +21,54 @@
|
|||||||
#include "wx/setup.h"
|
#include "wx/setup.h"
|
||||||
#include "wx/version.h"
|
#include "wx/version.h"
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// compiler and OS identification
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// OS
|
||||||
|
#if defined(__HPUX__) || defined(____SVR4____) || defined(__LINUX__) || defined(__sgi ) || defined(__unix__)
|
||||||
|
#ifndef __UNIX__
|
||||||
|
#define __UNIX__
|
||||||
|
#endif // Unix
|
||||||
|
|
||||||
// Helps SGI compilation, apparently
|
// Helps SGI compilation, apparently
|
||||||
#if defined(__SGI__)
|
#ifdef __SGI__
|
||||||
#if defined(__GNUG__)
|
#ifdef __GNUG__
|
||||||
#define __need_wchar_t
|
#define __need_wchar_t
|
||||||
#else
|
#else // !gcc
|
||||||
/* Note I use the term __SGI_CC__ for both cc and CC, its not a good idea to
|
// Note I use the term __SGI_CC__ for both cc and CC, its not a good
|
||||||
* mix gcc and cc/CC, the name mangling is different */
|
// idea to mix gcc and cc/CC, the name mangling is different
|
||||||
#define __SGI_CC__
|
#define __SGI_CC__
|
||||||
#endif
|
#endif // gcc/!gcc
|
||||||
#endif
|
#endif // SGI
|
||||||
|
|
||||||
#if defined(sun) || defined(__SUN__)
|
#if defined(sun) || defined(__SUN__)
|
||||||
# if !defined(__GNUG__)
|
#ifndef __GNUG__
|
||||||
#ifndef __SUNCC__
|
#ifndef __SUNCC__
|
||||||
#define __SUNCC__
|
#define __SUNCC__
|
||||||
|
#endif // Sun CC
|
||||||
#endif
|
#endif
|
||||||
# endif
|
#endif // Sun
|
||||||
#endif
|
#else // Windows
|
||||||
|
#ifndef __WINDOWS__
|
||||||
|
#define __WINDOWS__
|
||||||
|
#endif // Windows
|
||||||
|
|
||||||
|
// define another standard symbol for Microsoft Visual C++: the standard one
|
||||||
|
// (_MSC_VER) is also defined by Metrowerks compiler
|
||||||
|
#if defined(_MSC_VER) && !defined(__MWERKS__)
|
||||||
|
#define __VISUALC__
|
||||||
|
#elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__)
|
||||||
|
#define __BORLANDC__
|
||||||
|
#elif defined(__WATCOMC__)
|
||||||
|
//#define __WATCOMC__
|
||||||
|
#elif defined(__SC__)
|
||||||
|
#define __SYMANTECC__
|
||||||
|
#endif // compiler
|
||||||
|
#endif // OS
|
||||||
|
|
||||||
// suppress some Visual C++ warnings
|
// suppress some Visual C++ warnings
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
# pragma warning(disable:4244) // cobversion from double to float
|
# pragma warning(disable:4244) // cobversion from double to float
|
||||||
# pragma warning(disable:4100) // unreferenced formal parameter
|
# pragma warning(disable:4100) // unreferenced formal parameter
|
||||||
#endif
|
#endif
|
||||||
@@ -124,9 +151,9 @@
|
|||||||
typedef unsigned int bool;
|
typedef unsigned int bool;
|
||||||
#elif defined(__SALFORDC__)
|
#elif defined(__SALFORDC__)
|
||||||
typedef unsigned int bool;
|
typedef unsigned int bool;
|
||||||
#elif defined(_MSC_VER) && (_MSC_VER <= 1000)
|
#elif defined(__VISUALC__) && (__VISUALC__ <= 1000)
|
||||||
typedef unsigned int bool;
|
typedef unsigned int bool;
|
||||||
#elif defined(_MSC_VER) && (_MSC_VER == 1020)
|
#elif defined(__VISUALC__) && (__VISUALC__ == 1020)
|
||||||
#define bool unsigned int
|
#define bool unsigned int
|
||||||
#elif defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
|
#elif defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
|
||||||
typedef unsigned int bool;
|
typedef unsigned int bool;
|
||||||
@@ -144,7 +171,7 @@
|
|||||||
#endif // Sun CC
|
#endif // Sun CC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ( defined(_MSC_VER) && (_MSC_VER <= 800) ) || defined(__GNUWIN32__) || (defined(__BORLANDC__) && defined(__WIN16__)) || defined(__SC__) || defined(__SALFORDC__)
|
#if ( defined(__VISUALC__) && (__VISUALC__ <= 800) ) || defined(__GNUWIN32__) || (defined(__BORLANDC__) && defined(__WIN16__)) || defined(__SC__) || defined(__SALFORDC__)
|
||||||
// Not a good idea, because later system files (e.g. windows.h)
|
// Not a good idea, because later system files (e.g. windows.h)
|
||||||
// may try to define it. Use wxByte instead.
|
// may try to define it. Use wxByte instead.
|
||||||
// #define byte unsigned char
|
// #define byte unsigned char
|
||||||
@@ -281,30 +308,6 @@ enum ErrCode
|
|||||||
WXDLLEXPORT_DATA(extern const bool) wxTrue;
|
WXDLLEXPORT_DATA(extern const bool) wxTrue;
|
||||||
WXDLLEXPORT_DATA(extern const bool) wxFalse;
|
WXDLLEXPORT_DATA(extern const bool) wxFalse;
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// compiler and OS identification
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// OS
|
|
||||||
#if defined(__HPUX__) || defined(____SVR4____) || defined(__LINUX__) || defined(__sgi ) || defined(__unix__)
|
|
||||||
#ifndef __UNIX__
|
|
||||||
#define __UNIX__
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __UNIX__ // Windows
|
|
||||||
#if defined(_MSC_VER)
|
|
||||||
#define __VISUALC__
|
|
||||||
#elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__)
|
|
||||||
#define __BORLANDC__
|
|
||||||
#elif defined(__WATCOMC__)
|
|
||||||
//#define __WATCOMC__
|
|
||||||
#elif defined(__SC__)
|
|
||||||
#define __SYMANTECC__
|
|
||||||
#endif // compiler
|
|
||||||
|
|
||||||
#endif // OS
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// compiler specific settings
|
// compiler specific settings
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -315,25 +318,18 @@ WXDLLEXPORT_DATA(extern const bool) wxFalse;
|
|||||||
#pragma warning(disable: 4514) // unreferenced inline func has been removed
|
#pragma warning(disable: 4514) // unreferenced inline func has been removed
|
||||||
/*
|
/*
|
||||||
you might be tempted to disable this one also: triggered by CHECK and FAIL
|
you might be tempted to disable this one also: triggered by CHECK and FAIL
|
||||||
macros in debug.h, but it's, overall, is a rather useful one, so I leave it
|
macros in debug.h, but it's, overall, a rather useful one, so I leave it and
|
||||||
and will try to find some way to disable this warning just for CHECK/FAIL.
|
will try to find some way to disable this warning just for CHECK/FAIL. Anyone?
|
||||||
Anyone?
|
|
||||||
*/
|
*/
|
||||||
#pragma warning(disable: 4127) // conditional expression is constant
|
#pragma warning(disable: 4127) // conditional expression is constant
|
||||||
|
|
||||||
#endif // VC++
|
#endif // VC++
|
||||||
|
|
||||||
#if _MSC_VER > 1010
|
#if defined(__MWERKS__)
|
||||||
#undef try
|
#undef try
|
||||||
#undef except
|
#undef except
|
||||||
#undef finally
|
#undef finally
|
||||||
#define except(x) catch(...)
|
#define except(x) catch(...)
|
||||||
#elif defined(__MWERKS__)
|
#endif // Metrowerks
|
||||||
#undef try
|
|
||||||
#undef except
|
|
||||||
#undef finally
|
|
||||||
#define except(x) catch(...)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// where should i put this? we need to make sure of this as it breaks
|
// where should i put this? we need to make sure of this as it breaks
|
||||||
// the <iostream> code.
|
// the <iostream> code.
|
||||||
@@ -869,22 +865,22 @@ enum wxKeyCode
|
|||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
wxUNKNOWN_PLATFORM,
|
wxUNKNOWN_PLATFORM,
|
||||||
wxCURSES, /* Text-only CURSES */
|
wxCURSES, // Text-only CURSES
|
||||||
wxXVIEW_X, /* Sun's XView OpenLOOK toolkit */
|
wxXVIEW_X, // Sun's XView OpenLOOK toolkit
|
||||||
wxMOTIF_X, /* OSF Motif 1.x.x */
|
wxMOTIF_X, // OSF Motif 1.x.x
|
||||||
wxCOSE_X, /* OSF Common Desktop Environment */
|
wxCOSE_X, // OSF Common Desktop Environment
|
||||||
wxNEXTSTEP, /* NeXTStep */
|
wxNEXTSTEP, // NeXTStep
|
||||||
wxMACINTOSH, /* Apple System 7 */
|
wxMACINTOSH, // Apple System 7
|
||||||
wxGTK, /* GTK */
|
wxGTK, // GTK
|
||||||
wxQT, /* Qt */
|
wxQT, // Qt
|
||||||
wxGEOS, /* GEOS */
|
wxGEOS, // GEOS
|
||||||
wxOS2_PM, /* OS/2 Workplace */
|
wxOS2_PM, // OS/2 Workplace
|
||||||
wxWINDOWS, /* Windows or WfW */
|
wxWINDOWS, // Windows or WfW
|
||||||
wxPENWINDOWS, /* Windows for Pen Computing */
|
wxPENWINDOWS, // Windows for Pen Computing
|
||||||
wxWINDOWS_NT, /* Windows NT */
|
wxWINDOWS_NT, // Windows NT
|
||||||
wxWIN32S, /* Windows 32S API */
|
wxWIN32S, // Windows 32S API
|
||||||
wxWIN95, /* Windows 95 */
|
wxWIN95, // Windows 95
|
||||||
wxWIN386 /* Watcom 32-bit supervisor modus */
|
wxWIN386 // Watcom 32-bit supervisor modus
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Printing */
|
/* Printing */
|
||||||
|
@@ -44,7 +44,7 @@ class WXDLLEXPORT wxConfigBase;
|
|||||||
#else
|
#else
|
||||||
# include <istream>
|
# include <istream>
|
||||||
# include <ostream>
|
# include <ostream>
|
||||||
# ifdef _MSC_VER
|
# ifdef __VISUALC__
|
||||||
using namespace std;
|
using namespace std;
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,15 +29,11 @@
|
|||||||
typedef long off_t;
|
typedef long off_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if defined(__VISUALC__) || defined(__MWERKS__)
|
||||||
#define off_t _off_t
|
typedef _off_t off_t;
|
||||||
#endif
|
#elif defined(__BORLANDC__) && defined(__WIN16__)
|
||||||
|
|
||||||
#if defined(__BORLANDC__) && defined(__WIN16__)
|
|
||||||
typedef long off_t;
|
typedef long off_t;
|
||||||
#endif
|
#elif defined(__SC__)
|
||||||
|
|
||||||
#if defined(__SC__)
|
|
||||||
typedef long off_t;
|
typedef long off_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
20
include/wx/ioswrap.h
Normal file
20
include/wx/ioswrap.h
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: ioswrap.h
|
||||||
|
// Purpose: includes the correct iostream headers for current compiler
|
||||||
|
// Author: Vadim Zeitlin
|
||||||
|
// Modified by:
|
||||||
|
// Created: 03.02.99
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||||
|
// Licence: wxWindows license
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#if wxUSE_IOSTREAMH
|
||||||
|
// N.B. BC++ doesn't have istream.h, ostream.h
|
||||||
|
# include <iostream.h>
|
||||||
|
#else
|
||||||
|
# include <iostream>
|
||||||
|
# if defined(__VISUALC__) || defined(__MWERKS__)
|
||||||
|
using namespace std;
|
||||||
|
# endif
|
||||||
|
#endif
|
@@ -61,7 +61,7 @@ class WXDLLEXPORT wxFrame;
|
|||||||
# include <iostream.h>
|
# include <iostream.h>
|
||||||
#else
|
#else
|
||||||
# include <ostream>
|
# include <ostream>
|
||||||
# ifdef _MSC_VER
|
# if defined(__VISUALC__) || defined(__MWERKS__)
|
||||||
using namespace std;
|
using namespace std;
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
# include <iostream.h>
|
# include <iostream.h>
|
||||||
#else
|
#else
|
||||||
# include <ostream>
|
# include <ostream>
|
||||||
# ifdef _MSC_VER
|
# if defined(__VISUALC__) || defined(__MWERKS__)
|
||||||
using namespace std;
|
using namespace std;
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
@@ -54,7 +54,7 @@ void wxDebugFree(void * buf, bool isVect = FALSE);
|
|||||||
|
|
||||||
#if defined(__SUNCC__)
|
#if defined(__SUNCC__)
|
||||||
#define wxUSE_ARRAY_MEMORY_OPERATORS 0
|
#define wxUSE_ARRAY_MEMORY_OPERATORS 0
|
||||||
#elif !( defined (_MSC_VER) && (_MSC_VER <= 1020) ) || defined( __MWERKS__)
|
#elif !( defined (__VISUALC__) && (__VISUALC__ <= 1020) ) || defined( __MWERKS__)
|
||||||
#define wxUSE_ARRAY_MEMORY_OPERATORS 1
|
#define wxUSE_ARRAY_MEMORY_OPERATORS 1
|
||||||
#else
|
#else
|
||||||
#define wxUSE_ARRAY_MEMORY_OPERATORS 0
|
#define wxUSE_ARRAY_MEMORY_OPERATORS 0
|
||||||
@@ -76,7 +76,7 @@ void operator delete[] (void * buf);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// VC++ 6.0
|
// VC++ 6.0
|
||||||
#if _MSC_VER >= 1200
|
#if defined(__VISUALC__) && (__VISUALC__ >= 1200)
|
||||||
void operator delete(void *buf, char*, int);
|
void operator delete(void *buf, char*, int);
|
||||||
void operator delete[](void *buf, char*, int);
|
void operator delete[](void *buf, char*, int);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -19,12 +19,14 @@
|
|||||||
#ifndef _MSW_MSVCRT_H_
|
#ifndef _MSW_MSVCRT_H_
|
||||||
#define _MSW_MSVCRT_H_
|
#define _MSW_MSVCRT_H_
|
||||||
|
|
||||||
// use debug CRT functions for memory leak detections in VC++ if we're not
|
// use debug CRT functions for memory leak detections in VC++ 5.0+ in debug
|
||||||
// using wxWindows own methods
|
// builds
|
||||||
#if defined(__WXDEBUG__) && defined(_MSC_VER) && !wxUSE_GLOBAL_MEMORY_OPERATORS && !defined(__NO_VC_CRTDBG__)
|
|
||||||
#define wxUSE_VC_CRTDBG
|
|
||||||
#else
|
|
||||||
#undef wxUSE_VC_CRTDBG
|
#undef wxUSE_VC_CRTDBG
|
||||||
|
#if defined(__WXDEBUG__) && defined(__VISUALC__) && (__VISUALC__ >= 1000)
|
||||||
|
// it doesn't combine well with wxWin own memory debugging methods
|
||||||
|
#if !wxUSE_GLOBAL_MEMORY_OPERATORS && !defined(__NO_VC_CRTDBG__)
|
||||||
|
#define wxUSE_VC_CRTDBG
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef wxUSE_VC_CRTDBG
|
#ifdef wxUSE_VC_CRTDBG
|
||||||
@@ -47,3 +49,4 @@
|
|||||||
#endif // wxUSE_VC_CRTDBG
|
#endif // wxUSE_VC_CRTDBG
|
||||||
|
|
||||||
#endif // _MSW_MSVCRT_H_
|
#endif // _MSW_MSVCRT_H_
|
||||||
|
|
||||||
|
@@ -121,11 +121,10 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount);
|
|||||||
// Debugging support
|
// Debugging support
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
#if defined(__WXDEBUG__) && defined(_MSC_VER) && (_MSC_VER > 1000)
|
// VZ: I don't know it's not done for compilers other than VC++ but I leave it
|
||||||
// ----------------------------------------------------------------------------
|
// as is. Please note, though, that tracing OLE interface calls may be
|
||||||
//
|
// incredibly useful when debugging OLE programs.
|
||||||
// ----------------------------------------------------------------------------
|
#if defined(__WXDEBUG__) && defined(__VISUALC__) && (__VISUALC__ >= 1000)
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// All OLE specific log functions have DebugTrace level (as LogTrace)
|
// All OLE specific log functions have DebugTrace level (as LogTrace)
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -144,3 +143,4 @@ void wxLogRelease(const char *szInterface, ULONG cRef);
|
|||||||
#endif //WXDEBUG
|
#endif //WXDEBUG
|
||||||
|
|
||||||
#endif //_WX_OLEUTILS_H
|
#endif //_WX_OLEUTILS_H
|
||||||
|
|
||||||
|
@@ -44,7 +44,7 @@ class WXDLLEXPORT wxObject_Serialize;
|
|||||||
# include <iostream.h>
|
# include <iostream.h>
|
||||||
#else
|
#else
|
||||||
# include <ostream>
|
# include <ostream>
|
||||||
# ifdef _MSC_VER
|
# if defined(__VISUALC__) || defined(__MWERKS__)
|
||||||
using namespace std;
|
using namespace std;
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
@@ -198,13 +198,12 @@ class WXDLLEXPORT wxObject
|
|||||||
void operator delete (void * buf);
|
void operator delete (void * buf);
|
||||||
|
|
||||||
// VC++ 6.0
|
// VC++ 6.0
|
||||||
#if _MSC_VER >= 1200
|
#if defined(__VISUALC__) && (__VISUALC__ >= 1200)
|
||||||
void operator delete(void *buf, char*, int);
|
void operator delete(void *buf, char*, int);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Cause problems for VC++
|
// Causes problems for VC++
|
||||||
// #ifndef _MSC_VER
|
#if wxUSE_ARRAY_MEMORY_OPERATORS && !defined(__VISUALC__)
|
||||||
#if !defined(_MSC_VER) && wxUSE_ARRAY_MEMORY_OPERATORS
|
|
||||||
void * operator new[] (size_t size, char * fileName = NULL, int lineNum = 0);
|
void * operator new[] (size_t size, char * fileName = NULL, int lineNum = 0);
|
||||||
void operator delete[] (void * buf);
|
void operator delete[] (void * buf);
|
||||||
#endif
|
#endif
|
||||||
@@ -216,7 +215,7 @@ class WXDLLEXPORT wxObject
|
|||||||
#endif
|
#endif
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#endif
|
#endif // Debug & memory tracing
|
||||||
|
|
||||||
#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
|
#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
|
||||||
virtual void Dump(ostream& str);
|
virtual void Dump(ostream& str);
|
||||||
|
@@ -16,15 +16,10 @@
|
|||||||
#pragma interface "string.h"
|
#pragma interface "string.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Dependencies (should be included before this header):
|
|
||||||
* string.h
|
|
||||||
* stdio.h
|
|
||||||
* stdarg.h
|
|
||||||
* limits.h
|
|
||||||
*/
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
@@ -32,11 +27,12 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/defs.h" // Robert Roebling
|
#include "wx/defs.h"
|
||||||
|
|
||||||
#ifdef WXSTRING_IS_WXOBJECT
|
#ifdef WXSTRING_IS_WXOBJECT
|
||||||
#include "wx/object.h"
|
#include "wx/object.h"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif // !PCH
|
||||||
|
|
||||||
#include "wx/debug.h"
|
#include "wx/debug.h"
|
||||||
|
|
||||||
@@ -83,7 +79,7 @@ inline size_t WXDLLEXPORT Strlen(const char *psz)
|
|||||||
// portable strcasecmp/_stricmp
|
// portable strcasecmp/_stricmp
|
||||||
inline int WXDLLEXPORT Stricmp(const char *psz1, const char *psz2)
|
inline int WXDLLEXPORT Stricmp(const char *psz1, const char *psz2)
|
||||||
{
|
{
|
||||||
#if defined(_MSC_VER)
|
#if defined(__VISUALC__) || defined(__MWERKS__)
|
||||||
return _stricmp(psz1, psz2);
|
return _stricmp(psz1, psz2);
|
||||||
#elif defined(__SC__)
|
#elif defined(__SC__)
|
||||||
return _stricmp(psz1, psz2);
|
return _stricmp(psz1, psz2);
|
||||||
@@ -645,7 +641,7 @@ public:
|
|||||||
size_t find(const wxString& str, size_t nStart = 0) const;
|
size_t find(const wxString& str, size_t nStart = 0) const;
|
||||||
|
|
||||||
// VC++ 1.5 can't cope with this syntax.
|
// VC++ 1.5 can't cope with this syntax.
|
||||||
#if !(defined(_MSC_VER) && !defined(__WIN32__))
|
#if !defined(__VISUALC__) || defined(__WIN32__)
|
||||||
// find first n characters of sz
|
// find first n characters of sz
|
||||||
size_t find(const char* sz, size_t nStart = 0, size_t n = npos) const;
|
size_t find(const char* sz, size_t nStart = 0, size_t n = npos) const;
|
||||||
#endif
|
#endif
|
||||||
@@ -661,7 +657,7 @@ public:
|
|||||||
size_t rfind(const wxString& str, size_t nStart = npos) const;
|
size_t rfind(const wxString& str, size_t nStart = npos) const;
|
||||||
|
|
||||||
// VC++ 1.5 can't cope with this syntax.
|
// VC++ 1.5 can't cope with this syntax.
|
||||||
#if ! (defined(_MSC_VER) && !defined(__WIN32__))
|
#if !defined(__VISUALC__) || defined(__WIN32__)
|
||||||
// as find, but from the end
|
// as find, but from the end
|
||||||
size_t rfind(const char* sz, size_t nStart = npos,
|
size_t rfind(const char* sz, size_t nStart = npos,
|
||||||
size_t n = npos) const;
|
size_t n = npos) const;
|
||||||
@@ -854,19 +850,7 @@ wxString WXDLLEXPORT operator+(const char *psz, const wxString& string);
|
|||||||
|
|
||||||
#ifdef wxSTD_STRING_COMPATIBILITY
|
#ifdef wxSTD_STRING_COMPATIBILITY
|
||||||
|
|
||||||
// forward declare iostream
|
#include "wx/ioswrap.h"
|
||||||
// Known not to work with wxUSE_IOSTREAMH set to 0, so
|
|
||||||
// replacing with includes (on advice of ungod@pasdex.com.au)
|
|
||||||
// class WXDLLEXPORT istream;
|
|
||||||
#if wxUSE_IOSTREAMH
|
|
||||||
// N.B. BC++ doesn't have istream.h, ostream.h
|
|
||||||
#include <iostream.h>
|
|
||||||
#else
|
|
||||||
#include <istream>
|
|
||||||
# ifdef _MSC_VER
|
|
||||||
using namespace std;
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
WXDLLEXPORT istream& operator>>(istream& is, wxString& str);
|
WXDLLEXPORT istream& operator>>(istream& is, wxString& str);
|
||||||
|
|
||||||
|
@@ -23,14 +23,7 @@
|
|||||||
#include "wx/filefn.h"
|
#include "wx/filefn.h"
|
||||||
#include "wx/process.h"
|
#include "wx/process.h"
|
||||||
|
|
||||||
#if wxUSE_IOSTREAMH
|
#include "wx/ioswrap.h"
|
||||||
#include <iostream.h>
|
|
||||||
#else
|
|
||||||
#include <iostream>
|
|
||||||
# ifdef _MSC_VER
|
|
||||||
using namespace std;
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __X__
|
#ifdef __X__
|
||||||
#ifndef __VMS__
|
#ifndef __VMS__
|
||||||
|
@@ -24,16 +24,9 @@
|
|||||||
#if wxUSE_TIMEDATE
|
#if wxUSE_TIMEDATE
|
||||||
#include "wx/time.h"
|
#include "wx/time.h"
|
||||||
#include "wx/date.h"
|
#include "wx/date.h"
|
||||||
#endif
|
#endif // time/date
|
||||||
|
|
||||||
#if wxUSE_IOSTREAMH
|
#include "wx/ioswrap.h"
|
||||||
#include <iostream.h>
|
|
||||||
#else
|
|
||||||
#include <iostream>
|
|
||||||
# ifdef _MSC_VER
|
|
||||||
using namespace std;
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* wxVariantData stores the actual data in a wxVariant object,
|
* wxVariantData stores the actual data in a wxVariant object,
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// only do Unicode for Windows (VC++), for now
|
// only do Unicode for Windows (VC++), for now
|
||||||
#if defined(_MSC_VER) && defined(__WIN32__)
|
#if defined(__VISUALC__) && defined(__WIN32__)
|
||||||
|
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
typedef _TCHAR wxChar;
|
typedef _TCHAR wxChar;
|
||||||
@@ -212,7 +212,7 @@ inline bool WXDLLEXPORT wxIsEmpty(const wxChar *p) { return !p || !*p; }
|
|||||||
|
|
||||||
/// safe version of strlen() (returns 0 if passed NULL pointer)
|
/// safe version of strlen() (returns 0 if passed NULL pointer)
|
||||||
inline size_t WXDLLEXPORT wxStrlen(const wxChar *psz)
|
inline size_t WXDLLEXPORT wxStrlen(const wxChar *psz)
|
||||||
#if defined(_MSC_VER)
|
#if defined(__VISUALC__)
|
||||||
{ return psz ? _tcslen(psz) : 0; }
|
{ return psz ? _tcslen(psz) : 0; }
|
||||||
#else
|
#else
|
||||||
{ return psz ? strlen(psz) : 0; }
|
{ return psz ? strlen(psz) : 0; }
|
||||||
@@ -220,7 +220,7 @@ inline size_t WXDLLEXPORT wxStrlen(const wxChar *psz)
|
|||||||
|
|
||||||
/// portable strcasecmp/_stricmp
|
/// portable strcasecmp/_stricmp
|
||||||
inline int WXDLLEXPORT wxStricmp(const wxChar *, const wxChar *)
|
inline int WXDLLEXPORT wxStricmp(const wxChar *, const wxChar *)
|
||||||
#if defined(_MSC_VER)
|
#if defined(__VISUALC__)
|
||||||
{ return _tcsicmp(psz1, psz2); }
|
{ return _tcsicmp(psz1, psz2); }
|
||||||
#elif defined(__BORLANDC__)
|
#elif defined(__BORLANDC__)
|
||||||
{ return stricmp(psz1, psz2); }
|
{ return stricmp(psz1, psz2); }
|
||||||
|
@@ -21,14 +21,7 @@
|
|||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
|
|
||||||
#if wxUSE_IOSTREAMH
|
#include "wx/ioswrap.h"
|
||||||
#include <iostream.h>
|
|
||||||
#else
|
|
||||||
#include <iostream>
|
|
||||||
# ifdef _MSC_VER
|
|
||||||
using namespace std;
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "wx/list.h"
|
#include "wx/list.h"
|
||||||
#include "wx/hash.h"
|
#include "wx/hash.h"
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// check if to use precompiled headers
|
// check if to use precompiled headers
|
||||||
#if (defined(__BORLANDC__) || defined(_MSC_VER) || defined(__WATCOMC__)) && defined(__WXMSW__)
|
#if (defined(__BORLANDC__) || defined(__VISUALC__) || defined(__WATCOMC__)) && defined(__WXMSW__)
|
||||||
#if !NOPCH
|
#if !NOPCH
|
||||||
#define WX_PRECOMP
|
#define WX_PRECOMP
|
||||||
#endif
|
#endif
|
||||||
|
@@ -51,15 +51,12 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "wx/ioswrap.h"
|
||||||
|
|
||||||
#if wxUSE_IOSTREAMH
|
#if wxUSE_IOSTREAMH
|
||||||
#include <iostream.h>
|
|
||||||
#include <fstream.h>
|
#include <fstream.h>
|
||||||
#else
|
#else
|
||||||
#include <iostream>
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
# ifdef _MSC_VER
|
|
||||||
using namespace std;
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !USE_SHARED_LIBRARY
|
#if !USE_SHARED_LIBRARY
|
||||||
|
@@ -82,10 +82,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Microsoft compiler loves underscores, feed them to it
|
// Microsoft compiler loves underscores, feed them to it
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
|
|
||||||
#ifndef __MWERKS__
|
|
||||||
|
|
||||||
// functions
|
// functions
|
||||||
#define open _open
|
#define open _open
|
||||||
#define close _close
|
#define close _close
|
||||||
@@ -110,16 +107,11 @@
|
|||||||
|
|
||||||
#define S_IFDIR _S_IFDIR
|
#define S_IFDIR _S_IFDIR
|
||||||
#define S_IFREG _S_IFREG
|
#define S_IFREG _S_IFREG
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define W_OK 2
|
|
||||||
#define R_OK 4
|
|
||||||
#else
|
#else
|
||||||
#define tell(fd) lseek(fd, 0, SEEK_CUR)
|
#define tell(fd) lseek(fd, 0, SEEK_CUR)
|
||||||
#endif //_MSC_VER
|
#endif // VC++
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
#if defined(__BORLANDC__) || defined(_MSC_VER)
|
||||||
#define W_OK 2
|
#define W_OK 2
|
||||||
#define R_OK 4
|
#define R_OK 4
|
||||||
#endif
|
#endif
|
||||||
@@ -129,7 +121,6 @@
|
|||||||
#define O_BINARY (0)
|
#define O_BINARY (0)
|
||||||
#endif //__UNIX__
|
#endif //__UNIX__
|
||||||
|
|
||||||
|
|
||||||
#ifdef __SALFORDC__
|
#ifdef __SALFORDC__
|
||||||
#include <unix.h>
|
#include <unix.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -330,7 +321,7 @@ size_t wxFile::Write(const void *pBuf, size_t nCount)
|
|||||||
bool wxFile::Flush()
|
bool wxFile::Flush()
|
||||||
{
|
{
|
||||||
if ( IsOpened() ) {
|
if ( IsOpened() ) {
|
||||||
#if (defined(_MSC_VER) && !defined(__MWERKS__)) || wxHAVE_FSYNC
|
#if defined(__VISUALC__) || wxHAVE_FSYNC
|
||||||
if ( fsync(m_fd) == -1 )
|
if ( fsync(m_fd) == -1 )
|
||||||
{
|
{
|
||||||
wxLogSysError(_("can't flush file descriptor %d"), m_fd);
|
wxLogSysError(_("can't flush file descriptor %d"), m_fd);
|
||||||
@@ -399,9 +390,9 @@ off_t wxFile::Length() const
|
|||||||
{
|
{
|
||||||
wxASSERT( IsOpened() );
|
wxASSERT( IsOpened() );
|
||||||
|
|
||||||
#if defined( _MSC_VER ) && !defined( __MWERKS__ )
|
#ifdef __VISUALC__
|
||||||
int iRc = _filelength(m_fd);
|
int iRc = _filelength(m_fd);
|
||||||
#else
|
#else // !VC++
|
||||||
int iRc = tell(m_fd);
|
int iRc = tell(m_fd);
|
||||||
if ( iRc != -1 ) {
|
if ( iRc != -1 ) {
|
||||||
// @ have to use const_cast :-(
|
// @ have to use const_cast :-(
|
||||||
@@ -416,8 +407,7 @@ off_t wxFile::Length() const
|
|||||||
|
|
||||||
iRc = iLen;
|
iRc = iLen;
|
||||||
}
|
}
|
||||||
|
#endif // VC++
|
||||||
#endif //_MSC_VER
|
|
||||||
|
|
||||||
if ( iRc == -1 ) {
|
if ( iRc == -1 ) {
|
||||||
wxLogSysError(_("can't find length of file on file descriptor %d"), m_fd);
|
wxLogSysError(_("can't find length of file on file descriptor %d"), m_fd);
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
|
|
||||||
// there are just too many of those...
|
// there are just too many of those...
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
#pragma warning(disable:4706) // assignment within conditional expression
|
#pragma warning(disable:4706) // assignment within conditional expression
|
||||||
#endif // VC++
|
#endif // VC++
|
||||||
|
|
||||||
@@ -42,7 +42,9 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#ifndef __MWERKS__
|
#ifndef __MWERKS__
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
@@ -967,7 +969,7 @@ wxRenameFile (const wxString& file1, const wxString& file2)
|
|||||||
|
|
||||||
bool wxRemoveFile(const wxString& file)
|
bool wxRemoveFile(const wxString& file)
|
||||||
{
|
{
|
||||||
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
|
#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__)
|
||||||
int flag = remove(WXSTRINGCAST file);
|
int flag = remove(WXSTRINGCAST file);
|
||||||
#elif defined( __WXMAC__ )
|
#elif defined( __WXMAC__ )
|
||||||
strcpy( gwxMacFileName , file ) ;
|
strcpy( gwxMacFileName , file ) ;
|
||||||
@@ -1700,6 +1702,6 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
#pragma warning(default:4706) // assignment within conditional expression
|
#pragma warning(default:4706) // assignment within conditional expression
|
||||||
#endif // VC++
|
#endif // VC++
|
||||||
|
@@ -986,7 +986,7 @@ void wxOnAssert(const char *szFile, int nLine, const char *szMsg)
|
|||||||
|
|
||||||
// make life easier for people using VC++ IDE: clicking on the message will
|
// make life easier for people using VC++ IDE: clicking on the message will
|
||||||
// take us immediately to the place of the failed assert
|
// take us immediately to the place of the failed assert
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
sprintf(szBuf, _("%s(%d): assert failed"), szFile, nLine);
|
sprintf(szBuf, _("%s(%d): assert failed"), szFile, nLine);
|
||||||
#else // !VC++
|
#else // !VC++
|
||||||
// make the error message more clear for all the others
|
// make the error message more clear for all the others
|
||||||
|
@@ -38,15 +38,12 @@
|
|||||||
#include <wx/log.h>
|
#include <wx/log.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include "wx/ioswrap.h"
|
||||||
|
|
||||||
#if wxUSE_IOSTREAMH
|
#if wxUSE_IOSTREAMH
|
||||||
#include <iostream.h>
|
|
||||||
#include <fstream.h>
|
#include <fstream.h>
|
||||||
#else
|
#else
|
||||||
#include <iostream>
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
# ifdef _MSC_VER
|
|
||||||
using namespace std;
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(__WATCOMC__) && !defined(__VMS__) && !defined( __MWERKS__ ) && !defined(__SALFORDC__)
|
#if !defined(__WATCOMC__) && !defined(__VMS__) && !defined( __MWERKS__ ) && !defined(__SALFORDC__)
|
||||||
@@ -942,7 +939,7 @@ int wxDebugContext::CountObjectsLeft(bool sinceCheckpoint)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Seems OK all of a sudden. Maybe to do with linking with multithreaded library?
|
// Seems OK all of a sudden. Maybe to do with linking with multithreaded library?
|
||||||
#if 0 // def _MSC_VER
|
#if 0 // def __VISUALC__
|
||||||
#define NO_DEBUG_ALLOCATION
|
#define NO_DEBUG_ALLOCATION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1001,7 +998,7 @@ void operator delete (void * buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// VC++ 6.0
|
// VC++ 6.0
|
||||||
#if _MSC_VER >= 1200
|
#if defined(__VISUALC__) && (__VISUALC__ >= 1200)
|
||||||
void operator delete(void* pData, char* /* fileName */, int /* lineNum */)
|
void operator delete(void* pData, char* /* fileName */, int /* lineNum */)
|
||||||
{
|
{
|
||||||
// ::operator delete(pData);
|
// ::operator delete(pData);
|
||||||
|
@@ -41,14 +41,7 @@
|
|||||||
|
|
||||||
#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
|
#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
|
||||||
// for wxObject::Dump
|
// for wxObject::Dump
|
||||||
#if wxUSE_IOSTREAMH
|
#include "wx/ioswrap.h"
|
||||||
# include <iostream.h>
|
|
||||||
#else
|
|
||||||
# include <iostream>
|
|
||||||
# ifdef _MSC_VER
|
|
||||||
using namespace std;
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !USE_SHARED_LIBRARY
|
#if !USE_SHARED_LIBRARY
|
||||||
@@ -121,7 +114,7 @@ void wxObject::operator delete (void * buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// VC++ 6.0
|
// VC++ 6.0
|
||||||
#if _MSC_VER >= 1200
|
#if defined(__VISUALC__) && (__VISUALC__ >= 1200)
|
||||||
void wxObject::operator delete(void* pData, char* /* fileName */, int /* lineNum */)
|
void wxObject::operator delete(void* pData, char* /* fileName */, int /* lineNum */)
|
||||||
{
|
{
|
||||||
::operator delete(pData);
|
::operator delete(pData);
|
||||||
@@ -129,7 +122,7 @@ void wxObject::operator delete(void* pData, char* /* fileName */, int /* lineNum
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Cause problems for VC++ - crashes
|
// Cause problems for VC++ - crashes
|
||||||
#if !defined(_MSC_VER) && wxUSE_ARRAY_MEMORY_OPERATORS
|
#if !defined(__VISUALC__) && wxUSE_ARRAY_MEMORY_OPERATORS
|
||||||
void * wxObject::operator new[] (size_t size, char * fileName, int lineNum)
|
void * wxObject::operator new[] (size_t size, char * fileName, int lineNum)
|
||||||
{
|
{
|
||||||
return wxDebugAlloc(size, fileName, lineNum, TRUE, TRUE);
|
return wxDebugAlloc(size, fileName, lineNum, TRUE, TRUE);
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#if wxUSE_ODBC
|
#if wxUSE_ODBC
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
#pragma warning(disable:4706) // assignment within conditional expression
|
#pragma warning(disable:4706) // assignment within conditional expression
|
||||||
#endif // VC++
|
#endif // VC++
|
||||||
|
|
||||||
@@ -1831,7 +1831,7 @@ bool wxQueryField::IsDirty(void) {
|
|||||||
return dirty;
|
return dirty;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
#pragma warning(default:4706) // assignment within conditional expression
|
#pragma warning(default:4706) // assignment within conditional expression
|
||||||
#endif // VC++
|
#endif // VC++
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#if wxUSE_WX_RESOURCES
|
#if wxUSE_WX_RESOURCES
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
#pragma warning(disable:4706) // assignment within conditional expression
|
#pragma warning(disable:4706) // assignment within conditional expression
|
||||||
#endif // VC++
|
#endif // VC++
|
||||||
|
|
||||||
@@ -1568,7 +1568,7 @@ wxControl *wxWindow::CreateItem(const wxItemResource *resource, const wxItemReso
|
|||||||
return table->CreateItem((wxWindow *)this, resource, parentResource);
|
return table->CreateItem((wxWindow *)this, resource, parentResource);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
#pragma warning(default:4706) // assignment within conditional expression
|
#pragma warning(default:4706) // assignment within conditional expression
|
||||||
#endif // VC++
|
#endif // VC++
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#if wxUSE_WX_RESOURCES
|
#if wxUSE_WX_RESOURCES
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
#pragma warning(disable:4706) // assignment within conditional expression
|
#pragma warning(disable:4706) // assignment within conditional expression
|
||||||
#endif // VC++
|
#endif // VC++
|
||||||
|
|
||||||
@@ -2916,7 +2916,7 @@ wxControl *wxWindow::CreateItem(const wxItemResource *resource, const wxItemReso
|
|||||||
return table->CreateItem((wxWindow *)this, resource, parentResource);
|
return table->CreateItem((wxWindow *)this, resource, parentResource);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
#pragma warning(default:4706) // assignment within conditional expression
|
#pragma warning(default:4706) // assignment within conditional expression
|
||||||
#endif // VC++
|
#endif // VC++
|
||||||
|
|
||||||
|
@@ -97,7 +97,7 @@ void wxMacProcessEvents() ;
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ void wxMacProcessEvents() ;
|
|||||||
// implementations (such as PC-NFS) will require you to include this
|
// implementations (such as PC-NFS) will require you to include this
|
||||||
// or a similar routine (see appendix in WinSock doc or help file).
|
// or a similar routine (see appendix in WinSock doc or help file).
|
||||||
|
|
||||||
#if defined( NEED_WSAFDIsSet ) || defined( _MSC_VER )
|
#if defined( NEED_WSAFDIsSet ) || defined( __VISUALC__ )
|
||||||
int PASCAL FAR __WSAFDIsSet(SOCKET fd, fd_set FAR *set)
|
int PASCAL FAR __WSAFDIsSet(SOCKET fd, fd_set FAR *set)
|
||||||
{
|
{
|
||||||
int i = set->fd_count;
|
int i = set->fd_count;
|
||||||
@@ -440,9 +440,9 @@ wxSocketBase& wxSocketBase::WriteMsg(const char *buffer, size_t nbytes)
|
|||||||
SockMsg msg;
|
SockMsg msg;
|
||||||
|
|
||||||
// warning about 'cast truncates constant value'
|
// warning about 'cast truncates constant value'
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
#pragma warning(disable: 4310)
|
#pragma warning(disable: 4310)
|
||||||
#endif // _MSC_VER
|
#endif // __VISUALC__
|
||||||
|
|
||||||
msg.sig[0] = (char) 0xad;
|
msg.sig[0] = (char) 0xad;
|
||||||
msg.sig[1] = (char) 0xde;
|
msg.sig[1] = (char) 0xde;
|
||||||
@@ -468,9 +468,9 @@ wxSocketBase& wxSocketBase::WriteMsg(const char *buffer, size_t nbytes)
|
|||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
#pragma warning(default: 4310)
|
#pragma warning(default: 4310)
|
||||||
#endif // _MSC_VER
|
#endif // __VISUALC__
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSocketBase& wxSocketBase::Unread(const char *buffer, size_t nbytes)
|
wxSocketBase& wxSocketBase::Unread(const char *buffer, size_t nbytes)
|
||||||
|
@@ -90,7 +90,7 @@ extern const char WXDLLEXPORT *g_szNul = &g_strEmpty.dummy;
|
|||||||
// function: for Unix this is done with configure, for Windows we test the
|
// function: for Unix this is done with configure, for Windows we test the
|
||||||
// compiler explicitly.
|
// compiler explicitly.
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
#define wxVsprintf _vsnprintf
|
#define wxVsprintf _vsnprintf
|
||||||
#endif
|
#endif
|
||||||
#else // !Windows
|
#else // !Windows
|
||||||
@@ -107,7 +107,7 @@ extern const char WXDLLEXPORT *g_szNul = &g_strEmpty.dummy;
|
|||||||
#ifndef __SC__
|
#ifndef __SC__
|
||||||
#pragma message("Using sprintf() because no snprintf()-like function defined")
|
#pragma message("Using sprintf() because no snprintf()-like function defined")
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif // no vsnprintf
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// global functions
|
// global functions
|
||||||
@@ -119,46 +119,18 @@ extern const char WXDLLEXPORT *g_szNul = &g_strEmpty.dummy;
|
|||||||
// iostream ones.
|
// iostream ones.
|
||||||
//
|
//
|
||||||
// ATTN: you can _not_ use both of these in the same program!
|
// ATTN: you can _not_ use both of these in the same program!
|
||||||
#if wxUSE_IOSTREAMH
|
|
||||||
#include <iostream.h>
|
|
||||||
#define NAMESPACE
|
|
||||||
#else
|
|
||||||
#include <iostream>
|
|
||||||
# ifdef _MSC_VER
|
|
||||||
using namespace std;
|
|
||||||
# endif
|
|
||||||
// for msvc (bcc50+ also) you don't need these NAMESPACE defines,
|
|
||||||
// using namespace std; takes care of that.
|
|
||||||
#define NAMESPACE std::
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
istream& operator>>(istream& is, wxString& WXUNUSED(str))
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define wxVsprintf _vsnprintf
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#if defined ( HAVE_VSNPRINTF )
|
|
||||||
#define wxVsprintf vsnprintf
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef wxVsprintf
|
|
||||||
// vsprintf() is ANSI so we can always use it, but it's unsafe!
|
|
||||||
#define wxVsprintf(buffer,len,format,argptr) vsprintf(buffer,format, argptr)
|
|
||||||
#pragma message("Using sprintf() because no snprintf()-like function defined")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
NAMESPACE istream& operator>>(NAMESPACE istream& is, wxString& WXUNUSED(str))
|
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
int w = is.width(0);
|
int w = is.width(0);
|
||||||
if ( is.ipfx(0) ) {
|
if ( is.ipfx(0) ) {
|
||||||
NAMESPACE streambuf *sb = is.rdbuf();
|
streambuf *sb = is.rdbuf();
|
||||||
str.erase();
|
str.erase();
|
||||||
while ( true ) {
|
while ( true ) {
|
||||||
int ch = sb->sbumpc ();
|
int ch = sb->sbumpc ();
|
||||||
if ( ch == EOF ) {
|
if ( ch == EOF ) {
|
||||||
is.setstate(NAMESPACE ios::eofbit);
|
is.setstate(ios::eofbit);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if ( isspace(ch) ) {
|
else if ( isspace(ch) ) {
|
||||||
@@ -174,7 +146,7 @@ NAMESPACE istream& operator>>(NAMESPACE istream& is, wxString& WXUNUSED(str))
|
|||||||
|
|
||||||
is.isfx();
|
is.isfx();
|
||||||
if ( str.length() == 0 )
|
if ( str.length() == 0 )
|
||||||
is.setstate(NAMESPACE ios::failbit);
|
is.setstate(ios::failbit);
|
||||||
#endif
|
#endif
|
||||||
return is;
|
return is;
|
||||||
}
|
}
|
||||||
@@ -1142,12 +1114,12 @@ size_t wxString::find(const wxString& str, size_t nStart) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// VC++ 1.5 can't cope with the default argument in the header.
|
// VC++ 1.5 can't cope with the default argument in the header.
|
||||||
#if ! (defined(_MSC_VER) && !defined(__WIN32__))
|
#if !defined(__VISUALC__) || defined(__WIN32__)
|
||||||
size_t wxString::find(const char* sz, size_t nStart, size_t n) const
|
size_t wxString::find(const char* sz, size_t nStart, size_t n) const
|
||||||
{
|
{
|
||||||
return find(wxString(sz, n == npos ? 0 : n), nStart);
|
return find(wxString(sz, n == npos ? 0 : n), nStart);
|
||||||
}
|
}
|
||||||
#endif
|
#endif // VC++ 1.5
|
||||||
|
|
||||||
// Gives a duplicate symbol (presumably a case-insensitivity problem)
|
// Gives a duplicate symbol (presumably a case-insensitivity problem)
|
||||||
#if !defined(__BORLANDC__)
|
#if !defined(__BORLANDC__)
|
||||||
@@ -1178,7 +1150,7 @@ size_t wxString::rfind(const wxString& str, size_t nStart) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// VC++ 1.5 can't cope with the default argument in the header.
|
// VC++ 1.5 can't cope with the default argument in the header.
|
||||||
#if ! (defined(_MSC_VER) && !defined(__WIN32__))
|
#if !defined(__VISUALC__) || defined(__WIN32__)
|
||||||
size_t wxString::rfind(const char* sz, size_t nStart, size_t n) const
|
size_t wxString::rfind(const char* sz, size_t nStart, size_t n) const
|
||||||
{
|
{
|
||||||
return rfind(wxString(sz, n == npos ? 0 : n), nStart);
|
return rfind(wxString(sz, n == npos ? 0 : n), nStart);
|
||||||
@@ -1192,7 +1164,7 @@ size_t wxString::rfind(char ch, size_t nStart) const
|
|||||||
|
|
||||||
return p == NULL ? npos : p - c_str();
|
return p == NULL ? npos : p - c_str();
|
||||||
}
|
}
|
||||||
#endif
|
#endif // VC++ 1.5
|
||||||
|
|
||||||
wxString wxString::substr(size_t nStart, size_t nLen) const
|
wxString wxString::substr(size_t nStart, size_t nLen) const
|
||||||
{
|
{
|
||||||
|
@@ -32,17 +32,14 @@ seconds since January 1, 1901, GMT.
|
|||||||
#include "wx/time.h"
|
#include "wx/time.h"
|
||||||
#include "wx/date.h"
|
#include "wx/date.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include <wx/intl.h>
|
#include "wx/intl.h"
|
||||||
|
|
||||||
|
#include "wx/ioswrap.h"
|
||||||
|
|
||||||
#if wxUSE_IOSTREAMH
|
#if wxUSE_IOSTREAMH
|
||||||
#include <iostream.h>
|
|
||||||
#include <iomanip.h>
|
#include <iomanip.h>
|
||||||
#else
|
#else
|
||||||
#include <iostream>
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
# ifdef _MSC_VER
|
|
||||||
using namespace std;
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@@ -30,15 +30,12 @@
|
|||||||
#include "wx/textdlg.h"
|
#include "wx/textdlg.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "wx/ioswrap.h"
|
||||||
|
|
||||||
#if wxUSE_IOSTREAMH
|
#if wxUSE_IOSTREAMH
|
||||||
#include <iostream.h>
|
|
||||||
#include <fstream.h>
|
#include <fstream.h>
|
||||||
#else
|
#else
|
||||||
#include <iostream>
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
# ifdef _MSC_VER
|
|
||||||
using namespace std;
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@@ -163,14 +160,6 @@ int strncasecmp(const char *str_1, const char *str_2, size_t maxchar)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning (disable : 4245)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning (default : 4245)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
// This declaration is missing in SunOS!
|
// This declaration is missing in SunOS!
|
||||||
// (Yes, I know it is NOT ANSI-C but its in BSD libc)
|
// (Yes, I know it is NOT ANSI-C but its in BSD libc)
|
||||||
|
@@ -24,9 +24,6 @@
|
|||||||
# include <fstream.h>
|
# include <fstream.h>
|
||||||
#else
|
#else
|
||||||
# include <fstream>
|
# include <fstream>
|
||||||
# ifdef _MSC_VER
|
|
||||||
using namespace std;
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/stream.h"
|
#include "wx/stream.h"
|
||||||
|
@@ -24,9 +24,6 @@
|
|||||||
#include <fstream.h>
|
#include <fstream.h>
|
||||||
#else
|
#else
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
# ifdef _MSC_VER
|
|
||||||
using namespace std;
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
@@ -67,7 +67,7 @@ IMPLEMENT_CLASS(wxXLPHelpController, wxHelpControllerBase)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// suppress annoying warning "'this' used in base member init list" (so what?)
|
// suppress annoying warning "'this' used in base member init list" (so what?)
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
#pragma warning(disable: 4355)
|
#pragma warning(disable: 4355)
|
||||||
#endif // Visual C++
|
#endif // Visual C++
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ wxXLPHelpController::wxXLPHelpController(void)
|
|||||||
helpRunning = FALSE; helpConnection = NULL;
|
helpRunning = FALSE; helpConnection = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
#pragma warning(default: 4355)
|
#pragma warning(default: 4355)
|
||||||
#endif // Visual C++
|
#endif // Visual C++
|
||||||
|
|
||||||
|
@@ -227,7 +227,7 @@ bool wxApp::Initialize()
|
|||||||
|
|
||||||
// This is to foil optimizations in Visual C++ that throw out dummy.obj.
|
// This is to foil optimizations in Visual C++ that throw out dummy.obj.
|
||||||
// PLEASE DO NOT ALTER THIS.
|
// PLEASE DO NOT ALTER THIS.
|
||||||
#if defined(_MSC_VER) && !defined(WXMAKINGDLL)
|
#if defined(__VISUALC__) && !defined(WXMAKINGDLL)
|
||||||
extern char wxDummyChar;
|
extern char wxDummyChar;
|
||||||
if (wxDummyChar) wxDummyChar++;
|
if (wxDummyChar) wxDummyChar++;
|
||||||
#endif
|
#endif
|
||||||
@@ -545,7 +545,7 @@ void wxApp::CleanUp()
|
|||||||
#if !defined(_WINDLL) || (defined(_WINDLL) && defined(WXMAKINGDLL))
|
#if !defined(_WINDLL) || (defined(_WINDLL) && defined(WXMAKINGDLL))
|
||||||
|
|
||||||
// temporarily disable this warning
|
// temporarily disable this warning
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
#pragma warning(disable: 4715) // not all control paths return a value
|
#pragma warning(disable: 4715) // not all control paths return a value
|
||||||
#endif // Visual C++
|
#endif // Visual C++
|
||||||
|
|
||||||
@@ -565,7 +565,7 @@ int wxEntry(WXHINSTANCE hInstance,
|
|||||||
// FIXME other compilers must support Win32 SEH (structured exception
|
// FIXME other compilers must support Win32 SEH (structured exception
|
||||||
// handling) too, just find the appropriate keyword in their docs!
|
// handling) too, just find the appropriate keyword in their docs!
|
||||||
// Please note that it's _not_ the same as C++ exceptions!
|
// Please note that it's _not_ the same as C++ exceptions!
|
||||||
#if !defined(__WXDEBUG__) && defined(_MSC_VER) && !defined(__MWERKS__)
|
#if !defined(__WXDEBUG__) && defined(__VISUALC__)
|
||||||
#define CATCH_PROGRAM_EXCEPTIONS
|
#define CATCH_PROGRAM_EXCEPTIONS
|
||||||
|
|
||||||
__try {
|
__try {
|
||||||
@@ -656,7 +656,7 @@ int wxEntry(WXHINSTANCE hInstance,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// restore warning state
|
// restore warning state
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
#pragma warning(default: 4715) // not all control paths return a value
|
#pragma warning(default: 4715) // not all control paths return a value
|
||||||
#endif // Visual C++
|
#endif // Visual C++
|
||||||
|
|
||||||
@@ -1123,6 +1123,6 @@ HINSTANCE wxGetInstance()
|
|||||||
|
|
||||||
// For some reason, with MSVC++ 1.5, WinMain isn't linked in properly
|
// For some reason, with MSVC++ 1.5, WinMain isn't linked in properly
|
||||||
// if in a separate file. So include it here to ensure it's linked.
|
// if in a separate file. So include it here to ensure it's linked.
|
||||||
#if (defined(_MSC_VER) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !defined(__TWIN32__))
|
#if (defined(__VISUALC__) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !defined(__TWIN32__))
|
||||||
#include "main.cpp"
|
#include "main.cpp"
|
||||||
#endif
|
#endif
|
||||||
|
@@ -29,7 +29,8 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <windowsx.h>
|
#include <windowsx.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <wx/msw/dibutils.h>
|
|
||||||
|
#include "wx/msw/dibutils.h"
|
||||||
|
|
||||||
#if defined(__WIN32__)
|
#if defined(__WIN32__)
|
||||||
#if !defined(__MWERKS__) && !defined(__SALFORDC__)
|
#if !defined(__MWERKS__) && !defined(__SALFORDC__)
|
||||||
@@ -133,7 +134,7 @@ int DibWriteFile(LPSTR szFile, LPBITMAPINFOHEADER lpbi)
|
|||||||
bmf.bfReserved1 = 0;
|
bmf.bfReserved1 = 0;
|
||||||
bmf.bfReserved2 = 0;
|
bmf.bfReserved2 = 0;
|
||||||
bmf.bfOffBits = sizeof(bmf) + (char far*)(DibPtr(lpbi)) - (char far*)lpbi;
|
bmf.bfOffBits = sizeof(bmf) + (char far*)(DibPtr(lpbi)) - (char far*)lpbi;
|
||||||
#if defined( __WATCOMC__) || defined(_MSC_VER) || defined(__SC__) || defined(__SALFORDC__)
|
#if defined( __WATCOMC__) || defined(__VISUALC__) || defined(__SC__) || defined(__SALFORDC__)
|
||||||
if (_hwrite(fh, (LPCSTR)(&bmf), sizeof(bmf))<0 ||
|
if (_hwrite(fh, (LPCSTR)(&bmf), sizeof(bmf))<0 ||
|
||||||
_hwrite(fh, (LPCSTR)lpbi, size)<0) {
|
_hwrite(fh, (LPCSTR)lpbi, size)<0) {
|
||||||
_lclose(fh);
|
_lclose(fh);
|
||||||
|
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
// Foils optimizations in Visual C++ (see also app.cpp). Without it,
|
// Foils optimizations in Visual C++ (see also app.cpp). Without it,
|
||||||
// dummy.obj isn't linked and we get a linker error.
|
// dummy.obj isn't linked and we get a linker error.
|
||||||
#if defined(_MSC_VER)
|
#if defined(__VISUALC__)
|
||||||
char wxDummyChar = 0;
|
char wxDummyChar = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
// Foils optimizations in Visual C++ (see also app.cpp). Without it,
|
// Foils optimizations in Visual C++ (see also app.cpp). Without it,
|
||||||
// dummy.obj isn't linked and we get a linker error.
|
// dummy.obj isn't linked and we get a linker error.
|
||||||
#if defined(_MSC_VER) && defined(__WIN16__)
|
#if defined(__VISUALC__) && defined(__WIN16__)
|
||||||
char wxDummyChar=0;
|
char wxDummyChar=0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -359,7 +359,7 @@ const char *wxDataObject::GetFormatName(wxDataFormat format)
|
|||||||
{
|
{
|
||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
// case 'xxx' is not a valid value for switch of enum 'wxDataFormat'
|
// case 'xxx' is not a valid value for switch of enum 'wxDataFormat'
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
#pragma warning(disable:4063)
|
#pragma warning(disable:4063)
|
||||||
#endif // VC++
|
#endif // VC++
|
||||||
|
|
||||||
@@ -386,7 +386,7 @@ const char *wxDataObject::GetFormatName(wxDataFormat format)
|
|||||||
return s_szBuf;
|
return s_szBuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef __VISUALC__
|
||||||
#pragma warning(default:4063)
|
#pragma warning(default:4063)
|
||||||
#endif // VC++
|
#endif // VC++
|
||||||
|
|
||||||
|
@@ -37,7 +37,7 @@
|
|||||||
#include <wx/msw/ole/uuid.h>
|
#include <wx/msw/ole/uuid.h>
|
||||||
#include <wx/msw/ole/oleutils.h>
|
#include <wx/msw/ole/oleutils.h>
|
||||||
|
|
||||||
#if defined(_MSC_VER) && (_MSC_VER > 1000)
|
#if defined(__VISUALC__) && (__VISUALC__ > 1000)
|
||||||
#include <docobj.h>
|
#include <docobj.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount)
|
|||||||
// Debug support
|
// Debug support
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if defined(__WXDEBUG__) && defined(_MSC_VER) && (_MSC_VER > 1000)
|
#if defined(__WXDEBUG__) && defined(__VISUALC__) && (__VISUALC__ > 1000)
|
||||||
const char *GetIidName(REFIID riid)
|
const char *GetIidName(REFIID riid)
|
||||||
{
|
{
|
||||||
// an association between symbolic name and numeric value of an IID
|
// an association between symbolic name and numeric value of an IID
|
||||||
|
@@ -29,9 +29,6 @@
|
|||||||
# include <fstream.h>
|
# include <fstream.h>
|
||||||
#else
|
#else
|
||||||
# include <fstream>
|
# include <fstream>
|
||||||
# ifdef _MSC_VER
|
|
||||||
using namespace std;
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
@@ -42,9 +42,6 @@
|
|||||||
# include <fstream.h>
|
# include <fstream.h>
|
||||||
#else
|
#else
|
||||||
# include <fstream>
|
# include <fstream>
|
||||||
# ifdef _MSC_VER
|
|
||||||
using namespace std;
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@@ -76,33 +76,18 @@
|
|||||||
|
|
||||||
//// BEGIN for console support: VC++ only
|
//// BEGIN for console support: VC++ only
|
||||||
|
|
||||||
#if defined(__WXDEBUG__) && !defined(__WIN16__) && defined(_MSC_VER) && !defined(__NO_VC_CRTDBG__)
|
#include "wx/msw/msvcrt.h"
|
||||||
#define wxUSE_VC_CRTDBG
|
|
||||||
#else
|
|
||||||
#undef wxUSE_VC_CRTDBG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef wxUSE_VC_CRTDBG
|
|
||||||
// VC++ uses this macro as debug/release mode indicator
|
|
||||||
#ifndef _DEBUG
|
|
||||||
#define _DEBUG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#include "wx/ioswrap.h"
|
||||||
|
|
||||||
#if wxUSE_IOSTREAMH
|
#if wxUSE_IOSTREAMH
|
||||||
// N.B. BC++ doesn't have istream.h, ostream.h
|
// N.B. BC++ doesn't have istream.h, ostream.h
|
||||||
# include <iostream.h>
|
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
# include <fstream.h>
|
# include <fstream.h>
|
||||||
|
|
||||||
#else
|
#else
|
||||||
# include <istream>
|
|
||||||
# include <ostream>
|
|
||||||
# include <fstream>
|
# include <fstream>
|
||||||
# ifdef _MSC_VER
|
|
||||||
using namespace std;
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Need to undef new if including crtdbg.h */
|
/* Need to undef new if including crtdbg.h */
|
||||||
@@ -118,8 +103,6 @@
|
|||||||
# define new new(__FILE__,__LINE__)
|
# define new new(__FILE__,__LINE__)
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/// END for console support
|
/// END for console support
|
||||||
|
|
||||||
// In the WIN.INI file
|
// In the WIN.INI file
|
||||||
@@ -1089,7 +1072,7 @@ void OutputDebugStringW95(const char* lpOutputString, ...)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef wxUSE_VC_CRTDBG
|
#ifdef 0
|
||||||
|
|
||||||
// maximum mumber of lines the output console should have
|
// maximum mumber of lines the output console should have
|
||||||
static const WORD MAX_CONSOLE_LINES = 500;
|
static const WORD MAX_CONSOLE_LINES = 500;
|
||||||
@@ -1145,7 +1128,6 @@ void wxRedirectIOToConsole()
|
|||||||
ios::sync_with_stdio();
|
ios::sync_with_stdio();
|
||||||
|
|
||||||
SetConsoleCtrlHandler(MyConsoleHandler, TRUE);
|
SetConsoleCtrlHandler(MyConsoleHandler, TRUE);
|
||||||
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
// Not supported
|
// Not supported
|
||||||
|
Reference in New Issue
Block a user