X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9d8aca4832f9052729d2fc51d25c23f6d7006cab..c79146df7ece620777b8e4aa9ad98a8b7be2bac7:/src/unix/utilsunx.cpp?ds=sidebyside diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index bbaea579b4..0a9c8e538d 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -203,12 +203,9 @@ void wxMilliSleep(unsigned long milliseconds) int wxKill(long pid, wxSignal sig, wxKillError *rc, int flags) { int err = kill((pid_t) (flags & wxKILL_CHILDREN) ? -pid : pid, (int)sig); - if ( !err ) - *rc = wxKILL_OK; - else if ( rc ) { - switch ( errno ) + switch ( err ? errno : 0 ) { case 0: *rc = wxKILL_OK; @@ -242,7 +239,7 @@ int wxKill(long pid, wxSignal sig, wxKillError *rc, int flags) long wxExecute( const wxString& command, int flags, wxProcess *process ) { - wxCHECK_MSG( !command.IsEmpty(), 0, wxT("can't exec empty command") ); + wxCHECK_MSG( !command.empty(), 0, wxT("can't exec empty command") ); #if wxUSE_THREADS // fork() doesn't mix well with POSIX threads: on many systems the program @@ -375,6 +372,17 @@ bool wxShutdown(wxShutdownFlags wFlags) return system(wxString::Format(_T("init %c"), level).mb_str()) == 0; } +wxPowerType wxGetPowerType() +{ + // TODO + return wxPOWER_UNKNOWN; +} + +wxBatteryState wxGetBatteryState() +{ + // TODO + return wxBATTERY_UNKNOWN_STATE; +} // ---------------------------------------------------------------------------- // wxStream classes to support IO redirection in wxExecute @@ -663,9 +671,9 @@ long wxExecute(wxChar **argv, const wxChar* wxGetHomeDir( wxString *home ) { - *home = wxGetUserHome( wxString() ); + *home = wxGetUserHome( wxEmptyString ); wxString tmp; - if ( home->IsEmpty() ) + if ( home->empty() ) *home = wxT("/"); #ifdef __VMS tmp = *home;