#endif //WX_PRECOMP
#include "wx/os2/private.h"
-#include "wx/timer.h"
#include "wx/intl.h"
#include "wx/apptrait.h"
#include <netbios.h>
#endif
-static const wxChar WX_SECTION[] = _T("wxWindows");
+static const wxChar WX_SECTION[] = _T("wxWidgets");
static const wxChar eHOSTNAME[] = _T("HostName");
static const wxChar eUSERID[] = _T("UserId");
static const wxChar eUSERNAME[] = _T("UserName");
if ((zSysname = wxGetenv(_T("SYSTEM_NAME"))) == NULL)
{
- ULONG n = ::PrfQueryProfileString( HINI_PROFILE
- ,(PSZ)WX_SECTION
- ,(PSZ)eHOSTNAME
- ,(PSZ)zDefaultHost
- ,(void*)zBuf
- ,(ULONG)nMaxSize - 1
- );
+ ::PrfQueryProfileString( HINI_PROFILE
+ ,(PSZ)WX_SECTION
+ ,(PSZ)eHOSTNAME
+ ,(PSZ)zDefaultHost
+ ,(void*)zBuf
+ ,(ULONG)nMaxSize - 1
+ );
}
else
wxStrncpy(zBuf, zSysname, nMaxSize - 1);
{
wxChar* zShell = _T("CMD.EXE");
wxString sInputs;
- wxChar zTmp[255];
STARTDATA SData = {0};
PSZ PgmTitle = "Command Shell";
APIRET rc;
#endif
}
-void wxUsleep(
+void wxMilliSleep(
unsigned long ulMilliseconds
)
{
::DosSleep(ulMilliseconds);
}
+void wxMicroSleep(
+ unsigned long ulMicroseconds
+)
+{
+ ::DosSleep(ulMicroseconds/1000);
+}
+
void wxSleep(
int nSecs
)
, const wxString& rTitle
)
{
- wxBuffer = new wxChar[256];
+ wxChar *wxBuffer = new wxChar[256];
wxSprintf(wxBuffer, "%s\nContinue?", WXSTRINGCAST rMsg);
if (::WinMessageBox( HWND_DESKTOP
,NULL
DosBeep(1000,1000); // 1kHz during 1 sec.
}
+
+void wxAppTraits::InitializeGui(unsigned long &ulHab)
+{
+}
+
+void wxAppTraits::TerminateGui(unsigned long ulHab)
+{
+}
+
wxToolkitInfo & wxConsoleAppTraits::GetToolkitInfo()
{
static wxToolkitInfo vInfo;
wxString& rStrDir = *pStr;
// OS/2 has no idea about home,
- // so use the working directory instead?
+ // so use the working directory instead.
+ // However, we might have a valid HOME directory,
+ // as is used on many machines that have unix utilities
+ // on them, so we should use that, if available.
// 256 was taken from os2def.h
#ifndef MAX_PATH
# define MAX_PATH 256
#endif
- char zDirName[256];
- ULONG ulDirLen;
+ const wxChar *szHome = wxGetenv("HOME");
+ if ( szHome == NULL ) {
+ // we're homeless, use current directory.
+ rStrDir = wxT(".");
+ }
+ else
+ rStrDir = szHome;
- ::DosQueryCurrentDir(0, zDirName, &ulDirLen);
- rStrDir = zDirName;
return rStrDir.c_str();
}
wxChar* zHome;
wxString sUser1(rUser);
- wxBuffer = new wxChar[256];
+ char *wxBuffer = new wxChar[256];
#ifndef __EMX__
if (sUser1 != _T(""))
{