X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a3c0d7684a8e960ddf90401b716b196695b94cfd..137c8bde085d6d5b7c459902d2ea1a198ab48765:/src/msdos/utilsdos.cpp diff --git a/src/msdos/utilsdos.cpp b/src/msdos/utilsdos.cpp index ff98148001..189009fdee 100644 --- a/src/msdos/utilsdos.cpp +++ b/src/msdos/utilsdos.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: utils.cpp +// Name: src/msdos/utils.cpp // Purpose: DOS implementations of utility functions // Author: Vaclav Slavik, M.J.Wetherell // Id: $Id$ @@ -16,14 +16,17 @@ #endif #include "wx/utils.h" -#include "wx/string.h" -#include "wx/intl.h" +#ifndef WX_PRECOMP + #include "wx/string.h" + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/app.h" +#endif + #include "wx/apptrait.h" -#include "wx/log.h" #include "wx/process.h" #include "wx/confbase.h" // for wxExpandEnvVars() -#include "wx/app.h" #include "wx/cmdline.h" #include "wx/filename.h" #include "wx/wfstream.h" @@ -85,12 +88,12 @@ bool wxGetEnv(const wxString& var, wxString *value) // wxGetenv is defined as getenv() wxChar *p = wxGetenv(var); if ( !p ) - return FALSE; + return false; if ( value ) *value = p; - return TRUE; + return true; } bool wxSetEnv(const wxString& variable, const wxChar *value) @@ -207,17 +210,6 @@ wxChar *wxGetUserHome(const wxString& user) return _T(""); } -#if WXWIN_COMPATIBILITY_2_2 -void wxFatalError(const wxString &msg, const wxString &title) -{ - wxFprintf( stderr, _("Error ") ); - if (!title.IsNull()) wxFprintf( stderr, wxT("%s "), WXSTRINGCAST(title) ); - if (!msg.IsNull()) wxFprintf( stderr, wxT(": %s"), WXSTRINGCAST(msg) ); - wxFprintf( stderr, wxT(".\n") ); - exit(3); // the same exit code as for abort() -} -#endif // WXWIN_COMPATIBILITY_2_2 - // returns %UserName%, $USER or just "user" // bool wxGetUserId(wxChar *buf, int n) @@ -244,7 +236,7 @@ bool wxGetUserName(wxChar *buf, int n) bool wxGetHostName(wxChar *buf, int n) { const wxChar *host = wxGetenv(_T("ComputerName")); - + if (!host) host = wxGetenv(_T("HOSTNAME")); @@ -329,7 +321,7 @@ long wxExecute(const wxString& command, int flags, wxProcess *process) #if wxUSE_STREAMS // A wxFFileInputStream that deletes the file in it's destructor -// +// class wxTempFileInStream : public wxFFileInputStream { public: @@ -488,3 +480,13 @@ wxToolkitInfo& wxConsoleAppTraits::GetToolkitInfo() info.os = wxDOS; return info; } + +//---------------------------------------------------------------------------- +// OS Description +//---------------------------------------------------------------------------- + +wxString wxGetOsDescription() +{ + wxString osname(_T("DOS")); + return osname; +}