#define _WX_EXPRH__
#include <math.h>
+#if defined(__VISAGECPP__) && __IBMCPP__ >= 400
+# undef __BSEXCPT__
+#endif
#include <stdlib.h>
#ifdef ____HPUX__
#include "wx/wxchar.h"
#include "wx/buffer.h"
+#if defined(__VISAGECPP__) && __IBMCPP__ >= 400
+# undef __BSEXCPT__
+#endif
#include <stdlib.h>
#if wxUSE_WCHAR_T
// headers
// ----------------------------------------------------------------------------
-#ifdef __WXMAC__
+#if defined(__WXMAC__) || defined(__VISAGECPP__)
#include <ctype.h>
#endif
#include <std.h>
#endif
-#include <string.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <limits.h>
-#include <stdlib.h>
+#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()
#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
# 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
# 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
HBRUSH wxDisableButtonBrush = (HBRUSH) 0;
-MRESULT wxWndProc(HWND, UINT, MPARAM, MPARAM);
+MRESULT wxWndProc( HWND
+ ,ULONG
+ ,MPARAM
+ ,MPARAM
+ );
// ===========================================================================
// implementation
, char* argv[]
)
{
- HAB vHab;
+ HAB vHab = 0;
if (!wxApp::Initialize(vHab))
return 0;
// 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. (?)
// 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
// Gets an HDC for the specified printer configuration
WXHDC WXDLLEXPORT wxGetPrinterDC(const wxPrintData& printDataConst)
{
- HDC hDC;
+ HDC hDC = NULLHANDLE;
/*
wxPrintData printData = printDataConst;
printData.ConvertToNative();
}
// TODO:
-WXHFONT hFont;
+WXHFONT hFont = 0;
// HFONT hFont = ::CreateFont
// (
// nHeight, // height
#if wxUSE_SOCKETS
-#define BSD_SELECT // use Berkley Sockets select
+#define BSD_SELECT /* use Berkley Sockets select */
#include <assert.h>
#include <sys\types.h>
#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>
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;
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 )
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 )
// 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 )
// 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");
// is it one of standard MDI commands?
WXWPARAM wParam = 0;
- int msg;
+ int msg = 0;
// TODO:
/*
wxTopLevelWindows.Append(this);
// Enumerate all children
- HWND hWndNext;
+ HWND hWndNext = NULLHANDLE;
// TODO hWndNext = ::GetWindow((HWND) m_hWnd, GW_CHILD);
wxWindow* child = NULL;
int wx2os2PenStyle(int wx_style)
{
- int cstyle;
+ int cstyle = 0;
// TODO:
/*
switch (wx_style)
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);
}
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);
}
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 )
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
// 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;
, const wxString& rFile
)
{
- HAB hab;
- HINI hIni;
+ HAB hab = 0;
+ HINI hIni = 0;
if (rFile != "")
{
, const wxString& rFile
)
{
- HAB hab;
- HINI hIni;
+ HAB hab = 0;
+ HINI hIni = 0;
wxChar zDefunkt[] = _T("$$default");
char zBuf[1000];
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))
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
#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)
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
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__
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);