#include "wx/osx/private.h"
#endif
-#if !defined(__MWERKS__) && !defined(__WXWINCE__)
+#if !defined(__WXWINCE__)
#include <sys/types.h>
#include <sys/stat.h>
#endif
wxCHECK_MSG( map, false, wxS("output pointer can't be NULL") );
#if defined(__VISUALC__)
+ // This variable only exists to force the CRT to fill the wide char array,
+ // it might only have it in narrow char version until now as we use main()
+ // (and not _wmain()) as our entry point.
+ static wxChar* s_dummyEnvVar = _tgetenv(wxT("TEMP"));
+
wxChar **env = _tenviron;
#elif defined(__VMS)
// Now this routine wil give false for OpenVMS
// TODO : should we do something with logicals?
char **env=NULL;
-#elif defined(__WXOSX__)
+#elif defined(__DARWIN__)
#if wxOSX_USE_COCOA_OR_CARBON
// Under Mac shared libraries don't have access to the global environ
// variable so use this Mac-specific function instead as advised by
size_t len = in.length();
out.reserve(len);
- for ( size_t n = 0; n < len; n++ )
+ for ( wxString::const_iterator it = in.begin(); it != in.end(); ++it )
{
- wxChar ch = in[n];
+ wxChar ch = *it;
if ( (flags & wxStrip_Mnemonics) && ch == wxT('&') )
{
// skip it, it is used to introduce the accel char (or to quote
// itself in which case it should still be skipped): note that it
// can't be the last character of the string
- if ( ++n == len )
+ if ( ++it == in.end() )
{
wxLogDebug(wxT("Invalid menu string '%s'"), in.c_str());
}
else
{
// use the next char instead
- ch = in[n];
+ ch = *it;
}
}
else if ( (flags & wxStrip_Accel) && ch == wxT('\t') )
// Hack for wxNotebook case: at least in wxGTK, all pages
// claim to be shown, so we must only deal with the selected one.
#if wxUSE_NOTEBOOK
- if (win->IsKindOf(CLASSINFO(wxNotebook)))
+ if (wxDynamicCast(win, wxNotebook))
{
wxNotebook* nb = (wxNotebook*) win;
int sel = nb->GetSelection();