first pass of wxUniv merge - nothing works, most parts don't even compile
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10673 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -333,6 +333,8 @@ void wxHandleProcessTermination(wxEndProcessData *proc_data)
|
||||
// wxStream classes to support IO redirection in wxExecute
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_STREAMS
|
||||
|
||||
class wxProcessFileInputStream : public wxInputStream
|
||||
{
|
||||
public:
|
||||
@@ -429,6 +431,8 @@ size_t wxProcessFileOutputStream::OnSysWrite(const void *buffer, size_t bufsize)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif // wxUSE_STREAMS
|
||||
|
||||
long wxExecute(wxChar **argv,
|
||||
bool sync,
|
||||
wxProcess *process)
|
||||
@@ -590,16 +594,18 @@ long wxExecute(wxChar **argv,
|
||||
// pipe initialization: construction of the wxStreams
|
||||
if ( process && process->IsRedirected() )
|
||||
{
|
||||
#if wxUSE_STREAMS
|
||||
// These two streams are relative to this process.
|
||||
wxOutputStream *outStream = new wxProcessFileOutputStream(pipeIn[1]);
|
||||
wxInputStream *inStream = new wxProcessFileInputStream(pipeOut[0]);
|
||||
wxInputStream *errStream = new wxProcessFileInputStream(pipeErr[0]);
|
||||
|
||||
process->SetPipeStreams(inStream, outStream, errStream);
|
||||
#endif // wxUSE_STREAMS
|
||||
|
||||
close(pipeIn[0]); // close reading side
|
||||
close(pipeOut[1]); // close writing side
|
||||
close(pipeErr[1]); // close writing side
|
||||
|
||||
process->SetPipeStreams(inStream, outStream, errStream);
|
||||
}
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
Reference in New Issue
Block a user