From: Vadim Zeitlin Date: Thu, 29 Aug 2002 21:54:39 +0000 (+0000) Subject: changed wxExecute(char **) version to take wxChar ** X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0493ba1399a832f9540fc4d2150d2d090b33fb1a?ds=inline changed wxExecute(char **) version to take wxChar ** git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16855 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/utils.h b/include/wx/utils.h index 4b713c73a6..3f10fd277f 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -173,7 +173,7 @@ enum // If flags contain wxEXEC_SYNC, return -1 on failure and the exit code of the // process if everything was ok. Otherwise (i.e. if wxEXEC_ASYNC), return 0 on // failure and the PID of the launched process if ok. -WXDLLEXPORT long wxExecute(char **argv, int flags = wxEXEC_ASYNC, +WXDLLEXPORT long wxExecute(wxChar **argv, int flags = wxEXEC_ASYNC, wxProcess *process = (wxProcess *) NULL); WXDLLEXPORT long wxExecute(const wxString& command, int flags = wxEXEC_ASYNC, wxProcess *process = (wxProcess *) NULL); diff --git a/src/msw/utilsexc.cpp b/src/msw/utilsexc.cpp index 69ee8c8c46..3894aaeea7 100644 --- a/src/msw/utilsexc.cpp +++ b/src/msw/utilsexc.cpp @@ -892,16 +892,18 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler) #endif // Win16/32 } -long wxExecute(char **argv, int flags, wxProcess *handler) +long wxExecute(wxChar **argv, int flags, wxProcess *handler) { wxString command; - while ( *argv != NULL ) + for ( ;; ) { - command << *argv++ << ' '; - } + command += *argv++; + if ( !*argv ) + break; - command.RemoveLast(); + command += _T(' '); + } return wxExecute(command, flags, handler); }