X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/670f9935630beb2123a5ca62894ae92a3f0efa4f..cf283a470ab3eb4bc69959e3b5ae0edf30337fa5:/src/msdos/utilsdos.cpp diff --git a/src/msdos/utilsdos.cpp b/src/msdos/utilsdos.cpp index 189009fdee..6f432f4f89 100644 --- a/src/msdos/utilsdos.cpp +++ b/src/msdos/utilsdos.cpp @@ -96,7 +96,7 @@ bool wxGetEnv(const wxString& var, wxString *value) return true; } -bool wxSetEnv(const wxString& variable, const wxChar *value) +static bool wxDoSetEnv(const wxString& variable, const char *value) { wxString s = variable; if ( value ) @@ -112,6 +112,17 @@ bool wxSetEnv(const wxString& variable, const wxChar *value) return putenv(buf) == 0; } +bool wxSetEnv(const wxString& variable, const wxString& value) +{ + return wxDoSetEnv(variable, value.mb_str()); +} + +bool wxUnsetEnv(const wxString& variable) +{ + return wxDoSetEnv(variable, NULL); +} + + //---------------------------------------------------------------------------- // Hostname, username, home directory //---------------------------------------------------------------------------- @@ -310,7 +321,7 @@ long wxExecute(const wxString& command, int flags, wxProcess *process) argv[n] = NULL; while (n-- > 0) - argv[n] = wx_const_cast(wxChar*, args[n].c_str()); + argv[n] = wx_const_cast(wxChar*, (const char *)args[n].c_str()); long result = wxExecute(argv, flags, process); @@ -329,7 +340,7 @@ public: : wxFFileInputStream(name, _T("rt")) { } - ~wxTempFileInStream() + virtual ~wxTempFileInStream() { m_file->Close(); wxRemoveFile(m_file->GetName()); @@ -467,22 +478,9 @@ long wxExecute(wxChar **argv, int flags, wxProcess *process) return result; } -//---------------------------------------------------------------------------- -// Traits for console apps -//---------------------------------------------------------------------------- - -wxToolkitInfo& wxConsoleAppTraits::GetToolkitInfo() -{ - static wxToolkitInfo info; - info.versionMajor = _osmajor; - info.versionMinor = _osminor; - info.name = _T("wxBase"); - info.os = wxDOS; - return info; -} //---------------------------------------------------------------------------- -// OS Description +// OS-related //---------------------------------------------------------------------------- wxString wxGetOsDescription() @@ -490,3 +488,19 @@ wxString wxGetOsDescription() wxString osname(_T("DOS")); return osname; } + +wxOperatingSystemId wxGetOsVersion(int *verMaj, int *verMin) +{ + if ( verMaj ) + *verMaj = _osmajor; + if ( verMin ) + *verMin = _osminor; + + return wxOS_DOS; +} + +bool wxIsPlatform64Bit() +{ + return false; +} +