Visualage C++ V4.0 updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -13,6 +13,9 @@
|
||||
#define _WX_EXPRH__
|
||||
|
||||
#include <math.h>
|
||||
#if defined(__VISAGECPP__) && __IBMCPP__ >= 400
|
||||
# undef __BSEXCPT__
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef ____HPUX__
|
||||
|
@@ -20,6 +20,9 @@
|
||||
#include "wx/wxchar.h"
|
||||
#include "wx/buffer.h"
|
||||
|
||||
#if defined(__VISAGECPP__) && __IBMCPP__ >= 400
|
||||
# undef __BSEXCPT__
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
#if wxUSE_WCHAR_T
|
||||
|
@@ -38,7 +38,7 @@
|
||||
// headers
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXMAC__
|
||||
#if defined(__WXMAC__) || defined(__VISAGECPP__)
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
|
||||
@@ -46,11 +46,20 @@
|
||||
#include <std.h>
|
||||
#endif
|
||||
|
||||
#if defined(__VISAGECPP__) && __IBMCPP__ >= 400
|
||||
// problem in VACPP V4 with including stdlib.h multiple times
|
||||
// strconv includes it anyway
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
# include <stdarg.h>
|
||||
# include <limits.h>
|
||||
#else
|
||||
# include <string.h>
|
||||
# include <stdio.h>
|
||||
# include <stdarg.h>
|
||||
# include <limits.h>
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRINGS_H
|
||||
#include <strings.h> // for strcasecmp()
|
||||
|
@@ -61,6 +61,44 @@
|
||||
#define wxNO_TCHAR_STDIO
|
||||
#define wxNO_TCHAR_STDLIB
|
||||
#define wxNO_TCHAR_TIME
|
||||
#define wxNO_TCHAR_LOCALE
|
||||
//
|
||||
// supplemental VA V4 defs so at least we know what these are
|
||||
// just define to standard defs
|
||||
//
|
||||
|
||||
// for wcslen
|
||||
#include <wchar.h>
|
||||
|
||||
// locale.h functons -- not defined in tchar.h
|
||||
#define wxSetlocale setlocale
|
||||
// some stdio functions are defined others are not
|
||||
// these are not
|
||||
#define wxFgetchar fgetchar
|
||||
#define wxFopen fopen
|
||||
#define wxFputchar fputchar
|
||||
#define wxFreopen freopen
|
||||
#define wxGets gets
|
||||
#define wxPerror perror
|
||||
#define wxPuts puts
|
||||
#define wxRemove remove
|
||||
#define wxRename rename
|
||||
#define wxTmpnam tmpnam
|
||||
#define wxUngetc ungetc
|
||||
#define wxVsscanf vsscanf
|
||||
// stdlib not defined in VA V4
|
||||
#if !wxUSE_UNICODE
|
||||
# define wxAtof atof
|
||||
#endif
|
||||
#define wxAtoi atoi
|
||||
#define wxAtol atol
|
||||
#define wxGetenv getenv
|
||||
#define wxSystem system
|
||||
// time.h functions -- none defined in tchar.h
|
||||
#define wxAsctime asctime
|
||||
#define wxCtime ctime
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef wxHAVE_TCHAR_FUNCTIONS
|
||||
@@ -157,7 +195,7 @@ typedef _TUCHAR wxUChar;
|
||||
# define wxVprintf _vtprintf
|
||||
# define wxVsscanf _vstscanf
|
||||
# define wxVsprintf _vstprintf
|
||||
#elif defined(__VISAGECPP__)
|
||||
#elif defined(__VISAGECPP__) && (__IBMCPP__ >= 400)
|
||||
// it has some stdio.h functions, apparently
|
||||
# define wxFgetc _fgettc
|
||||
# define wxFgets _fgetts
|
||||
@@ -215,6 +253,8 @@ typedef _TUCHAR wxUChar;
|
||||
# define wxUSE_WCHAR_T 0
|
||||
# elif defined(__WATCOMC__)
|
||||
# define wxUSE_WCHAR_T 0
|
||||
# elif defined(__VISAGECPP__) && (__IBMCPP__ >= 400)
|
||||
# define wxUSE_WCHAR_T 1
|
||||
# else
|
||||
// add additional compiler checks if this fails
|
||||
# define wxUSE_WCHAR_T 1
|
||||
|
@@ -93,7 +93,11 @@ HICON wxDEFAULT_MDIPARENTFRAME_ICON = (HICON) NULL;
|
||||
|
||||
HBRUSH wxDisableButtonBrush = (HBRUSH) 0;
|
||||
|
||||
MRESULT wxWndProc(HWND, UINT, MPARAM, MPARAM);
|
||||
MRESULT wxWndProc( HWND
|
||||
,ULONG
|
||||
,MPARAM
|
||||
,MPARAM
|
||||
);
|
||||
|
||||
// ===========================================================================
|
||||
// implementation
|
||||
@@ -399,7 +403,7 @@ int wxEntry(
|
||||
, char* argv[]
|
||||
)
|
||||
{
|
||||
HAB vHab;
|
||||
HAB vHab = 0;
|
||||
|
||||
if (!wxApp::Initialize(vHab))
|
||||
return 0;
|
||||
@@ -874,7 +878,7 @@ void wxExit()
|
||||
// Yield to incoming messages
|
||||
bool wxYield()
|
||||
{
|
||||
HAB vHab;
|
||||
HAB vHab = 0;
|
||||
QMSG vMsg;
|
||||
// We want to go back to the main message loop
|
||||
// if we see a WM_QUIT. (?)
|
||||
|
@@ -35,8 +35,8 @@ IMPLEMENT_CLASS(wxPrinterDC, wxDC)
|
||||
// This form is deprecated
|
||||
wxPrinterDC::wxPrinterDC(const wxString& driver_name, const wxString& device_name, const wxString& file, bool interactive, int orientation)
|
||||
{
|
||||
LONG lType;
|
||||
HAB hab;
|
||||
LONG lType = 0;
|
||||
HAB hab = 0;
|
||||
DEVOPENSTRUC devOpen = { (char*)device_name.c_str()
|
||||
,(char*)driver_name.c_str()
|
||||
,NULL
|
||||
@@ -284,7 +284,7 @@ static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName)
|
||||
// Gets an HDC for the specified printer configuration
|
||||
WXHDC WXDLLEXPORT wxGetPrinterDC(const wxPrintData& printDataConst)
|
||||
{
|
||||
HDC hDC;
|
||||
HDC hDC = NULLHANDLE;
|
||||
/*
|
||||
wxPrintData printData = printDataConst;
|
||||
printData.ConvertToNative();
|
||||
|
@@ -387,7 +387,7 @@ bool wxFont::RealizeResource()
|
||||
}
|
||||
|
||||
// TODO:
|
||||
WXHFONT hFont;
|
||||
WXHFONT hFont = 0;
|
||||
// HFONT hFont = ::CreateFont
|
||||
// (
|
||||
// nHeight, // height
|
||||
|
@@ -11,7 +11,7 @@
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
|
||||
#define BSD_SELECT // use Berkley Sockets select
|
||||
#define BSD_SELECT /* use Berkley Sockets select */
|
||||
|
||||
#include <assert.h>
|
||||
#include <sys\types.h>
|
||||
@@ -28,6 +28,13 @@
|
||||
#include <sys\socket.h>
|
||||
#include <sys\ioctl.h>
|
||||
#include <sys\select.h>
|
||||
#define select(a,b,c,d,e) bsdselect(a,b,c,d,e)
|
||||
int _System bsdselect(int,
|
||||
struct fd_set *,
|
||||
struct fd_set *,
|
||||
struct fd_set *,
|
||||
struct timeval *);
|
||||
int _System soclose(int);
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
@@ -323,7 +323,7 @@ bool wxIniConfig::Read(const wxString& szKey, long *pl) const
|
||||
|
||||
static const int nMagic = 17; // 17 is some "rare" number
|
||||
static const int nMagic2 = 28; // arbitrary number != nMagic
|
||||
long lVal; // = GetPrivateProfileInt(m_strGroup, strKey, nMagic, m_strLocalFilename);
|
||||
long lVal = 0; // = GetPrivateProfileInt(m_strGroup, strKey, nMagic, m_strLocalFilename);
|
||||
if ( lVal != nMagic ) {
|
||||
// the value was read from the file
|
||||
*pl = lVal;
|
||||
@@ -349,7 +349,7 @@ bool wxIniConfig::Write(const wxString& szKey, const wxString& szValue)
|
||||
wxConfigPathChanger path(this, szKey);
|
||||
wxString strKey = GetPrivateKeyName(path.Name());
|
||||
|
||||
bool bOk; // = WritePrivateProfileString(m_strGroup, strKey,
|
||||
bool bOk = FALSE; // = WritePrivateProfileString(m_strGroup, strKey,
|
||||
// szValue, m_strLocalFilename) != 0;
|
||||
|
||||
if ( !bOk )
|
||||
@@ -394,7 +394,7 @@ bool wxIniConfig::DeleteEntry(const wxString& szKey, bool bGroupIfEmptyAlso)
|
||||
return TRUE;
|
||||
|
||||
// delete the current group too
|
||||
bool bOk; // = WritePrivateProfileString(m_strGroup, NULL,
|
||||
bool bOk = FALSE; // = WritePrivateProfileString(m_strGroup, NULL,
|
||||
// NULL, m_strLocalFilename) != 0;
|
||||
|
||||
if ( !bOk )
|
||||
@@ -409,7 +409,7 @@ bool wxIniConfig::DeleteGroup(const wxString& szKey)
|
||||
|
||||
// passing NULL as section name to WritePrivateProfileString deletes the
|
||||
// whole section according to the docs
|
||||
bool bOk; // = WritePrivateProfileString(path.Name(), NULL,
|
||||
bool bOk = FALSE; // = WritePrivateProfileString(path.Name(), NULL,
|
||||
// NULL, m_strLocalFilename) != 0;
|
||||
|
||||
if ( !bOk )
|
||||
@@ -429,7 +429,7 @@ bool wxIniConfig::DeleteAll()
|
||||
|
||||
// then delete our own ini file
|
||||
char szBuf[MAX_PATH];
|
||||
size_t nRc; // = GetWindowsDirectory(szBuf, WXSIZEOF(szBuf));
|
||||
size_t nRc = 0; // = GetWindowsDirectory(szBuf, WXSIZEOF(szBuf));
|
||||
if ( nRc == 0 )
|
||||
{
|
||||
wxLogLastError("GetWindowsDirectory");
|
||||
|
@@ -420,7 +420,7 @@ bool wxMDIParentFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd)
|
||||
|
||||
// is it one of standard MDI commands?
|
||||
WXWPARAM wParam = 0;
|
||||
int msg;
|
||||
int msg = 0;
|
||||
|
||||
// TODO:
|
||||
/*
|
||||
|
@@ -62,7 +62,7 @@ bool wxWindow::LoadNativeDialog(wxWindow* parent, wxWindowID& id)
|
||||
wxTopLevelWindows.Append(this);
|
||||
|
||||
// Enumerate all children
|
||||
HWND hWndNext;
|
||||
HWND hWndNext = NULLHANDLE;
|
||||
// TODO hWndNext = ::GetWindow((HWND) m_hWnd, GW_CHILD);
|
||||
|
||||
wxWindow* child = NULL;
|
||||
|
@@ -240,7 +240,7 @@ void wxPen::SetCap(int Cap)
|
||||
|
||||
int wx2os2PenStyle(int wx_style)
|
||||
{
|
||||
int cstyle;
|
||||
int cstyle = 0;
|
||||
// TODO:
|
||||
/*
|
||||
switch (wx_style)
|
||||
|
@@ -302,7 +302,8 @@ void wxTextCtrl::Paste()
|
||||
bool wxTextCtrl::CanCopy() const
|
||||
{
|
||||
// Can copy if there's a selection
|
||||
long from, to;
|
||||
long from = 0L;
|
||||
long to = 0L;
|
||||
// GetSelection(& from, & to);
|
||||
return (from != to);
|
||||
}
|
||||
@@ -310,7 +311,8 @@ bool wxTextCtrl::CanCopy() const
|
||||
bool wxTextCtrl::CanCut() const
|
||||
{
|
||||
// Can cut if there's a selection
|
||||
long from, to;
|
||||
long from = 0L;
|
||||
long to = 0L;
|
||||
// GetSelection(& from, & to);
|
||||
return (from != to);
|
||||
}
|
||||
@@ -527,7 +529,7 @@ bool wxTextCtrl::PositionToXY(long pos, long *x, long *y) const
|
||||
HWND hWnd = GetHwnd();
|
||||
|
||||
// This gets the line number containing the character
|
||||
int lineNo;
|
||||
int lineNo = -1;
|
||||
// lineNo = (int)SendMessage(hWnd, EM_LINEFROMCHAR, (WPARAM)pos, 0);
|
||||
|
||||
if ( lineNo == -1 )
|
||||
|
@@ -65,9 +65,9 @@ bool wxGetHostName(
|
||||
char zServer[256];
|
||||
char zComputer[256];
|
||||
unsigned long ulLevel = 0;
|
||||
unsigned char* zBuffer;
|
||||
unsigned long ulBuffer;
|
||||
unsigned long* pulTotalAvail;
|
||||
unsigned char* zBuffer = NULL;
|
||||
unsigned long ulBuffer = 256;
|
||||
unsigned long* pulTotalAvail = NULL;
|
||||
|
||||
NetBios32GetInfo( (const unsigned char*)zServer
|
||||
,(const unsigned char*)zComputer
|
||||
@@ -197,7 +197,7 @@ bool wxShell(
|
||||
// Get free memory in bytes, or -1 if cannot determine amount (e.g. on UNIX)
|
||||
long wxGetFreeMemory()
|
||||
{
|
||||
void* pMemptr;
|
||||
void* pMemptr = NULL;
|
||||
ULONG lSize;
|
||||
ULONG lMemFlags;
|
||||
APIRET rc;
|
||||
@@ -336,8 +336,8 @@ bool wxWriteResource(
|
||||
, const wxString& rFile
|
||||
)
|
||||
{
|
||||
HAB hab;
|
||||
HINI hIni;
|
||||
HAB hab = 0;
|
||||
HINI hIni = 0;
|
||||
|
||||
if (rFile != "")
|
||||
{
|
||||
@@ -418,8 +418,8 @@ bool wxGetResource(
|
||||
, const wxString& rFile
|
||||
)
|
||||
{
|
||||
HAB hab;
|
||||
HINI hIni;
|
||||
HAB hab = 0;
|
||||
HINI hIni = 0;
|
||||
wxChar zDefunkt[] = _T("$$default");
|
||||
char zBuf[1000];
|
||||
|
||||
@@ -669,8 +669,8 @@ bool wxCheckForInterrupt(
|
||||
if(pWnd)
|
||||
{
|
||||
QMSG vMsg;
|
||||
HAB hab;
|
||||
HWND hwndFilter;
|
||||
HAB hab = 0;
|
||||
HWND hwndFilter = NULLHANDLE;
|
||||
HWND hwndWin= (HWND) pWnd->GetHWND();
|
||||
|
||||
while(::WinPeekMsg(hab, &vMsg, hwndFilter, 0, 0, PM_REMOVE))
|
||||
|
@@ -248,9 +248,9 @@ bool wxGetFullHostName(
|
||||
char zServer[256];
|
||||
char zComputer[256];
|
||||
unsigned long ulLevel = 0;
|
||||
unsigned char* zBuffer;
|
||||
unsigned long ulBuffer;
|
||||
unsigned long* pulTotalAvail;
|
||||
unsigned char* zBuffer = NULL;
|
||||
unsigned long ulBuffer = 256;
|
||||
unsigned long* pulTotalAvail = NULL;
|
||||
|
||||
NetBios32GetInfo( (const unsigned char*)zServer
|
||||
,(const unsigned char*)zComputer
|
||||
|
@@ -18,13 +18,18 @@
|
||||
|
||||
#include "wx/file.h"
|
||||
#include "wx/os2/wave.h"
|
||||
#include "wx/os2/private.h"
|
||||
|
||||
#ifdef RECT
|
||||
#undef RECT
|
||||
#endif
|
||||
#include <mmio.h>
|
||||
#include <mmsystem.h>
|
||||
#define INCL_32 /* force 32 bit compile */
|
||||
#define INCL_GPIBITMAPS
|
||||
#define INCL_DOSFILEMGR
|
||||
#define INCL_WIN
|
||||
#define INCL_GPI
|
||||
#define INCL_PM
|
||||
#include <os2.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <os2medef.h>
|
||||
#include <mmioos2.h>
|
||||
|
||||
wxWave::wxWave()
|
||||
: m_waveData(NULL), m_waveLength(0), m_isResource(FALSE)
|
||||
|
@@ -623,7 +623,7 @@ WXDWORD wxWindow::MakeExtendedStyle(long style, bool eliminateBorders)
|
||||
WXDWORD wxWindow::Determine3DEffects(WXDWORD defaultBorderStyle,
|
||||
bool *want3D) const
|
||||
{
|
||||
DWORD exStyle; // remove after implementation doe
|
||||
DWORD exStyle = 0L; // remove after implementation doe
|
||||
/* TODO: this ought to be fun
|
||||
*
|
||||
// If matches certain criteria, then assume no 3D effects
|
||||
@@ -977,7 +977,7 @@ void wxWindow::UnpackMenuSelect(WXWPARAM wParam, WXLPARAM lParam,
|
||||
wxWindow *wxWndHook = NULL;
|
||||
|
||||
// Main window proc
|
||||
MRESULT wxWndProc(HWND hWnd, UINT message, MPARAM wParam, MPARAM lParam)
|
||||
MRESULT wxWndProc(HWND hWnd, ULONG message, MPARAM wParam, MPARAM lParam)
|
||||
{
|
||||
// trace all messages - useful for the debugging
|
||||
#ifdef __WXDEBUG__
|
||||
|
@@ -411,7 +411,7 @@ ScanOtherColors(Display *display, XpmColor *colors, int ncolors, Pixel *pixels,
|
||||
|
||||
xcolor->pixel = *pixels;
|
||||
}
|
||||
#ifdef wx_msw
|
||||
#if defined(wx_msw) || defined(wx_pm)
|
||||
XQueryColors(display, (Colormap *)colormap, xcolors, ncolors);
|
||||
#else
|
||||
XQueryColors(display, (Colormap)colormap, xcolors, ncolors);
|
||||
|
Reference in New Issue
Block a user