* Fixes.
* Added end process notification in motif. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -37,7 +37,7 @@ wxOutputStream& WXDLLEXPORT wxEndL(wxOutputStream& o_stream);
|
|||||||
class WXDLLEXPORT wxStreamBuffer {
|
class WXDLLEXPORT wxStreamBuffer {
|
||||||
public:
|
public:
|
||||||
typedef enum {
|
typedef enum {
|
||||||
read, write, read_write
|
read = 0, write, read_write
|
||||||
} BufMode;
|
} BufMode;
|
||||||
|
|
||||||
// -----------
|
// -----------
|
||||||
@@ -51,9 +51,12 @@ class WXDLLEXPORT wxStreamBuffer {
|
|||||||
// -----------
|
// -----------
|
||||||
// Filtered IO
|
// Filtered IO
|
||||||
// -----------
|
// -----------
|
||||||
void Read(void *buffer, size_t size);
|
size_t Read(void *buffer, size_t size);
|
||||||
void Write(const void *buffer, size_t size);
|
size_t Read(wxStreamBuffer *buf);
|
||||||
bool WriteBack(const char *buffer, size_t size);
|
size_t Write(const void *buffer, size_t size);
|
||||||
|
size_t Write(wxStreamBuffer *buf);
|
||||||
|
|
||||||
|
size_t WriteBack(const char *buffer, size_t size);
|
||||||
bool WriteBack(char c);
|
bool WriteBack(char c);
|
||||||
char GetChar();
|
char GetChar();
|
||||||
void PutChar(char c);
|
void PutChar(char c);
|
||||||
@@ -78,7 +81,12 @@ class WXDLLEXPORT wxStreamBuffer {
|
|||||||
|
|
||||||
bool FlushBuffer();
|
bool FlushBuffer();
|
||||||
bool FillBuffer();
|
bool FillBuffer();
|
||||||
size_t GetDataLeft() const;
|
size_t GetDataLeft();
|
||||||
|
|
||||||
|
// --------------
|
||||||
|
// Administration
|
||||||
|
// --------------
|
||||||
|
wxStreamBase *Stream() { return m_stream; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
char *AllocSpaceWBack(size_t needed_size);
|
char *AllocSpaceWBack(size_t needed_size);
|
||||||
@@ -98,7 +106,7 @@ class WXDLLEXPORT wxStreamBuffer {
|
|||||||
|
|
||||||
wxStreamBase *m_stream;
|
wxStreamBase *m_stream;
|
||||||
BufMode m_mode;
|
BufMode m_mode;
|
||||||
bool m_destroybuf;
|
bool m_destroybuf, m_destroystream;
|
||||||
};
|
};
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
@@ -1034,8 +1034,10 @@ void wxSocketBase::WantSpeedBuffer(char *buffer, size_t nbytes,
|
|||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
m_lcount = 0;
|
m_lcount = 0;
|
||||||
m_error = errno;
|
m_error = errno;
|
||||||
} else
|
} else {
|
||||||
m_lcount = ret;
|
m_lcount = ret;
|
||||||
|
m_error = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxSocketBase::WantBuffer(char *buffer, size_t nbytes,
|
void wxSocketBase::WantBuffer(char *buffer, size_t nbytes,
|
||||||
|
@@ -24,6 +24,8 @@
|
|||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define BUF_TEMP_SIZE 10000
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxStreamBuffer
|
// wxStreamBuffer
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -31,15 +33,16 @@
|
|||||||
wxStreamBuffer::wxStreamBuffer(wxStreamBase& stream, BufMode mode)
|
wxStreamBuffer::wxStreamBuffer(wxStreamBase& stream, BufMode mode)
|
||||||
: m_buffer_start(NULL), m_buffer_end(NULL), m_buffer_pos(NULL),
|
: m_buffer_start(NULL), m_buffer_end(NULL), m_buffer_pos(NULL),
|
||||||
m_buffer_size(0), m_fixed(TRUE), m_flushable(TRUE), m_stream(&stream),
|
m_buffer_size(0), m_fixed(TRUE), m_flushable(TRUE), m_stream(&stream),
|
||||||
m_mode(mode), m_destroybuf(FALSE)
|
m_mode(mode), m_destroybuf(FALSE), m_destroystream(FALSE)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
wxStreamBuffer::wxStreamBuffer(BufMode mode)
|
wxStreamBuffer::wxStreamBuffer(BufMode mode)
|
||||||
: m_buffer_start(NULL), m_buffer_end(NULL), m_buffer_pos(NULL),
|
: m_buffer_start(NULL), m_buffer_end(NULL), m_buffer_pos(NULL),
|
||||||
m_buffer_size(0), m_fixed(TRUE), m_flushable(FALSE), m_stream(NULL),
|
m_buffer_size(0), m_fixed(TRUE), m_flushable(FALSE), m_stream(NULL),
|
||||||
m_mode(mode), m_destroybuf(FALSE)
|
m_mode(mode), m_destroybuf(FALSE), m_destroystream(TRUE)
|
||||||
{
|
{
|
||||||
|
m_stream = new wxStreamBase();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxStreamBuffer::wxStreamBuffer(const wxStreamBuffer& buffer)
|
wxStreamBuffer::wxStreamBuffer(const wxStreamBuffer& buffer)
|
||||||
@@ -53,24 +56,27 @@ wxStreamBuffer::wxStreamBuffer(const wxStreamBuffer& buffer)
|
|||||||
m_stream = buffer.m_stream;
|
m_stream = buffer.m_stream;
|
||||||
m_mode = buffer.m_mode;
|
m_mode = buffer.m_mode;
|
||||||
m_destroybuf = FALSE;
|
m_destroybuf = FALSE;
|
||||||
|
m_destroystream = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxStreamBuffer::~wxStreamBuffer()
|
wxStreamBuffer::~wxStreamBuffer()
|
||||||
{
|
{
|
||||||
if (m_destroybuf)
|
if (m_destroybuf)
|
||||||
wxDELETEA(m_buffer_start);
|
wxDELETEA(m_buffer_start);
|
||||||
|
if (m_destroystream)
|
||||||
|
delete m_stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxStreamBuffer::WriteBack(const char *buf, size_t bufsize)
|
size_t wxStreamBuffer::WriteBack(const char *buf, size_t bufsize)
|
||||||
{
|
{
|
||||||
char *ptrback;
|
char *ptrback;
|
||||||
|
|
||||||
ptrback = AllocSpaceWBack(bufsize);
|
ptrback = AllocSpaceWBack(bufsize);
|
||||||
if (!ptrback)
|
if (!ptrback)
|
||||||
return FALSE;
|
return 0;
|
||||||
|
|
||||||
memcpy(ptrback, buf, bufsize);
|
memcpy(ptrback, buf, bufsize);
|
||||||
return TRUE;
|
return bufsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxStreamBuffer::WriteBack(char c)
|
bool wxStreamBuffer::WriteBack(char c)
|
||||||
@@ -226,8 +232,10 @@ void wxStreamBuffer::PutChar(char c)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!GetDataLeft() && !FlushBuffer())
|
if (!GetDataLeft() && !FlushBuffer()) {
|
||||||
|
m_stream->m_lasterror = wxStream_EOF;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
PutToBuffer(&c, 1);
|
PutToBuffer(&c, 1);
|
||||||
m_stream->m_lastcount = 1;
|
m_stream->m_lastcount = 1;
|
||||||
@@ -244,15 +252,17 @@ char wxStreamBuffer::GetChar()
|
|||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!GetDataLeft() && !FillBuffer())
|
if (!GetDataLeft()) {
|
||||||
|
m_stream->m_lasterror = wxStream_EOF;
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
GetFromBuffer(&c, 1);
|
GetFromBuffer(&c, 1);
|
||||||
m_stream->m_lastcount = 1;
|
m_stream->m_lastcount = 1;
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStreamBuffer::Read(void *buffer, size_t size)
|
size_t wxStreamBuffer::Read(void *buffer, size_t size)
|
||||||
{
|
{
|
||||||
wxASSERT(m_stream != NULL);
|
wxASSERT(m_stream != NULL);
|
||||||
|
|
||||||
@@ -263,13 +273,12 @@ void wxStreamBuffer::Read(void *buffer, size_t size)
|
|||||||
m_stream->m_lastcount = GetWBack((char *)buffer, size);
|
m_stream->m_lastcount = GetWBack((char *)buffer, size);
|
||||||
size -= m_stream->m_lastcount;
|
size -= m_stream->m_lastcount;
|
||||||
if (size == 0)
|
if (size == 0)
|
||||||
return;
|
return m_stream->m_lastcount;
|
||||||
|
|
||||||
buffer = (void *)((char *)buffer+m_stream->m_lastcount);
|
buffer = (void *)((char *)buffer+m_stream->m_lastcount);
|
||||||
|
|
||||||
if (!m_buffer_size) {
|
if (!m_buffer_size) {
|
||||||
m_stream->m_lastcount += m_stream->OnSysRead(buffer, size);
|
return (m_stream->m_lastcount += m_stream->OnSysRead(buffer, size));
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------
|
// -----------------
|
||||||
@@ -288,8 +297,9 @@ void wxStreamBuffer::Read(void *buffer, size_t size)
|
|||||||
buffer = (char *)buffer + buf_left; // ANSI C++ violation.
|
buffer = (char *)buffer + buf_left; // ANSI C++ violation.
|
||||||
|
|
||||||
if (!FillBuffer()) {
|
if (!FillBuffer()) {
|
||||||
m_stream->m_lastcount = orig_size-size;
|
if (m_stream->m_lasterror == wxStream_NOERROR)
|
||||||
return;
|
m_stream->m_lasterror = wxStream_EOF;
|
||||||
|
return (m_stream->m_lastcount = orig_size-size);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@@ -298,10 +308,23 @@ void wxStreamBuffer::Read(void *buffer, size_t size)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_stream->m_lastcount += orig_size;
|
return (m_stream->m_lastcount += orig_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStreamBuffer::Write(const void *buffer, size_t size)
|
size_t wxStreamBuffer::Read(wxStreamBuffer *s_buf)
|
||||||
|
{
|
||||||
|
char buf[BUF_TEMP_SIZE];
|
||||||
|
size_t s = 0, bytes_read = BUF_TEMP_SIZE;
|
||||||
|
|
||||||
|
while (bytes_read == BUF_TEMP_SIZE) {
|
||||||
|
bytes_read = Read(buf, bytes_read);
|
||||||
|
bytes_read = s_buf->Write(buf, bytes_read);
|
||||||
|
s += bytes_read;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t wxStreamBuffer::Write(const void *buffer, size_t size)
|
||||||
{
|
{
|
||||||
wxASSERT(m_stream != NULL);
|
wxASSERT(m_stream != NULL);
|
||||||
|
|
||||||
@@ -309,10 +332,8 @@ void wxStreamBuffer::Write(const void *buffer, size_t size)
|
|||||||
// Buffering disabled
|
// Buffering disabled
|
||||||
// ------------------
|
// ------------------
|
||||||
|
|
||||||
if (!m_buffer_size) {
|
if (!m_buffer_size)
|
||||||
m_stream->m_lastcount = m_stream->OnSysWrite(buffer, size);
|
return (m_stream->m_lastcount = m_stream->OnSysWrite(buffer, size));
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------
|
// ------------------
|
||||||
// Buffering enabled
|
// Buffering enabled
|
||||||
@@ -331,9 +352,11 @@ void wxStreamBuffer::Write(const void *buffer, size_t size)
|
|||||||
buffer = (char *)buffer + buf_left; // ANSI C++ violation.
|
buffer = (char *)buffer + buf_left; // ANSI C++ violation.
|
||||||
|
|
||||||
if (!FlushBuffer()) {
|
if (!FlushBuffer()) {
|
||||||
m_stream->m_lastcount = orig_size-size;
|
if (m_stream->m_lasterror == wxStream_NOERROR)
|
||||||
return;
|
m_stream->m_lasterror = wxStream_EOF;
|
||||||
|
return (m_stream->m_lastcount = orig_size-size);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_buffer_pos = m_buffer_start;
|
m_buffer_pos = m_buffer_start;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -343,7 +366,22 @@ void wxStreamBuffer::Write(const void *buffer, size_t size)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_stream->m_lastcount = orig_size;
|
return (m_stream->m_lastcount = orig_size);
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t wxStreamBuffer::Write(wxStreamBuffer *sbuf)
|
||||||
|
{
|
||||||
|
char buf[BUF_TEMP_SIZE];
|
||||||
|
size_t s = 0, bytes_count = BUF_TEMP_SIZE;
|
||||||
|
|
||||||
|
while (bytes_count == BUF_TEMP_SIZE) {
|
||||||
|
if (m_stream->StreamSize() < bytes_count)
|
||||||
|
bytes_count = m_stream->StreamSize();
|
||||||
|
bytes_count = sbuf->Read(buf, bytes_count);
|
||||||
|
bytes_count = Write(buf, bytes_count);
|
||||||
|
s += bytes_count;
|
||||||
|
}
|
||||||
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
off_t wxStreamBuffer::Seek(off_t pos, wxSeekMode mode)
|
off_t wxStreamBuffer::Seek(off_t pos, wxSeekMode mode)
|
||||||
@@ -352,7 +390,7 @@ off_t wxStreamBuffer::Seek(off_t pos, wxSeekMode mode)
|
|||||||
|
|
||||||
last_access = GetLastAccess();
|
last_access = GetLastAccess();
|
||||||
|
|
||||||
if (m_fixed) {
|
if (!m_flushable) {
|
||||||
diff = pos + GetIntPosition();
|
diff = pos + GetIntPosition();
|
||||||
if (diff < 0 || diff > last_access)
|
if (diff < 0 || diff > last_access)
|
||||||
return wxInvalidOffset;
|
return wxInvalidOffset;
|
||||||
@@ -392,7 +430,7 @@ off_t wxStreamBuffer::Tell() const
|
|||||||
{
|
{
|
||||||
off_t pos;
|
off_t pos;
|
||||||
|
|
||||||
if (!m_fixed) {
|
if (m_flushable) {
|
||||||
pos = m_stream->OnSysTell();
|
pos = m_stream->OnSysTell();
|
||||||
if (pos == wxInvalidOffset)
|
if (pos == wxInvalidOffset)
|
||||||
return wxInvalidOffset;
|
return wxInvalidOffset;
|
||||||
@@ -401,8 +439,10 @@ off_t wxStreamBuffer::Tell() const
|
|||||||
return GetIntPosition();
|
return GetIntPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t wxStreamBuffer::GetDataLeft() const
|
size_t wxStreamBuffer::GetDataLeft()
|
||||||
{
|
{
|
||||||
|
if (m_buffer_end == m_buffer_pos && m_flushable)
|
||||||
|
FillBuffer();
|
||||||
return m_buffer_end-m_buffer_pos;
|
return m_buffer_end-m_buffer_pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -480,23 +520,20 @@ wxInputStream& wxInputStream::Read(void *buffer, size_t size)
|
|||||||
|
|
||||||
char wxInputStream::Peek()
|
char wxInputStream::Peek()
|
||||||
{
|
{
|
||||||
if (!m_i_streambuf->GetDataLeft())
|
m_i_streambuf->GetDataLeft();
|
||||||
m_i_streambuf->FillBuffer();
|
|
||||||
|
|
||||||
return *(m_i_streambuf->GetBufferPos());
|
return *(m_i_streambuf->GetBufferPos());
|
||||||
}
|
}
|
||||||
|
|
||||||
#define BUF_TEMP_SIZE 10000
|
|
||||||
|
|
||||||
wxInputStream& wxInputStream::Read(wxOutputStream& stream_out)
|
wxInputStream& wxInputStream::Read(wxOutputStream& stream_out)
|
||||||
{
|
{
|
||||||
char buf[BUF_TEMP_SIZE];
|
char buf[BUF_TEMP_SIZE];
|
||||||
size_t bytes_read = BUF_TEMP_SIZE;
|
size_t bytes_read = BUF_TEMP_SIZE;
|
||||||
|
|
||||||
while (bytes_read == BUF_TEMP_SIZE && stream_out.LastError() != wxStream_NOERROR) {
|
while (bytes_read == BUF_TEMP_SIZE) {
|
||||||
bytes_read = Read(buf, bytes_read).LastRead();
|
bytes_read = Read(buf, bytes_read).LastRead();
|
||||||
|
bytes_read = stream_out.Write(buf, bytes_read).LastWrite();
|
||||||
stream_out.Write(buf, bytes_read);
|
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
@@ -55,18 +55,52 @@
|
|||||||
|
|
||||||
#include <Xm/Xm.h>
|
#include <Xm/Xm.h>
|
||||||
|
|
||||||
#define wxEXECUTE_WIN_MESSAGE 10000
|
struct wxLocalProcessData
|
||||||
|
{
|
||||||
|
int pid, end_process;
|
||||||
|
wxProcess *process;
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef __SOLARIS__
|
||||||
|
// somehow missing from sys/wait.h but in the system's docs
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
pid_t wait4(pid_t pid, int *statusp, int options, struct rusage
|
||||||
|
*rusage);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void xt_notify_end_process(XtPointer client, int *fid,
|
void xt_notify_end_process(XtPointer client, int *fid,
|
||||||
XtInputId *id)
|
XtInputId *id)
|
||||||
{
|
{
|
||||||
Bool *flag = (Bool *) client;
|
wxLocalProcessData *process_data = (wxLocalProcessData *)client;
|
||||||
*flag = TRUE;
|
|
||||||
|
int pid;
|
||||||
|
|
||||||
|
pid = (process_data->pid > 0) ? process_data->pid : -(process_data->pid);
|
||||||
|
|
||||||
|
/* wait4 is not part of any standard, use at own risk
|
||||||
|
* not sure what wait4 does, but wait3 seems to be closest, whats a digit ;-)
|
||||||
|
* --- offer@sgi.com */
|
||||||
|
#if !defined(__sgi)
|
||||||
|
wait4(process_data->pid, NULL, 0, NULL);
|
||||||
|
#else
|
||||||
|
wait3((int *) NULL, 0, (rusage *) NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
XtRemoveInput(*id);
|
XtRemoveInput(*id);
|
||||||
|
if (process_data->process)
|
||||||
|
process_data->process->OnTerminate(process_data->pid);
|
||||||
|
|
||||||
|
process_data->end_process = TRUE;
|
||||||
|
|
||||||
|
if (process_data->pid > 0)
|
||||||
|
delete process_data;
|
||||||
|
else
|
||||||
|
process_data->pid = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
long wxExecute(char **argv, bool sync, wxProcess *WXUNUSED(handler))
|
long wxExecute(char **argv, bool sync, wxProcess *handler)
|
||||||
{
|
{
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
return(0);
|
return(0);
|
||||||
@@ -114,28 +148,34 @@ long wxExecute(char **argv, bool sync, wxProcess *WXUNUSED(handler))
|
|||||||
_exit (-1);
|
_exit (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int end_process = 0;
|
wxLocalProcessData *process_data = new wxLocalProcessData;
|
||||||
|
|
||||||
|
process_data->end_process = 0;
|
||||||
|
process_data->process = handler;
|
||||||
|
process_data->pid = (sync) ? pid : -pid;
|
||||||
|
|
||||||
close(proc_link[1]);
|
close(proc_link[1]);
|
||||||
XtAppAddInput((XtAppContext) wxTheApp->GetAppContext(), proc_link[0],
|
XtAppAddInput((XtAppContext) wxTheApp->GetAppContext(), proc_link[0],
|
||||||
(XtPointer *) XtInputReadMask,
|
(XtPointer *) XtInputReadMask,
|
||||||
(XtInputCallbackProc) xt_notify_end_process,
|
(XtInputCallbackProc) xt_notify_end_process,
|
||||||
(XtPointer) &end_process);
|
(XtPointer) process_data);
|
||||||
|
|
||||||
if (sync) {
|
if (sync) {
|
||||||
while (!end_process)
|
while (!process_data->end_process)
|
||||||
XtAppProcessEvent((XtAppContext) wxTheApp->GetAppContext(), XtIMAll);
|
XtAppProcessEvent((XtAppContext) wxTheApp->GetAppContext(), XtIMAll);
|
||||||
|
|
||||||
if (WIFEXITED(end_process) != 0)
|
if (WIFEXITED(process_data->end_process) != 0)
|
||||||
return WEXITSTATUS(end_process);
|
return WEXITSTATUS(process_data->end_process);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete process_data;
|
||||||
|
|
||||||
return pid;
|
return pid;
|
||||||
#endif
|
#endif
|
||||||
// end VMS
|
// end VMS
|
||||||
}
|
}
|
||||||
|
|
||||||
long wxExecute (const wxString& command, bool sync, wxProcess* WXUNUSED(process))
|
long wxExecute (const wxString& command, bool sync, wxProcess* handler)
|
||||||
{
|
{
|
||||||
#ifdef VMS
|
#ifdef VMS
|
||||||
return(0);
|
return(0);
|
||||||
@@ -156,7 +196,7 @@ long wxExecute (const wxString& command, bool sync, wxProcess* WXUNUSED(process)
|
|||||||
while ((argv[argc++] = strtok (NULL, IFS)) != NULL)
|
while ((argv[argc++] = strtok (NULL, IFS)) != NULL)
|
||||||
/* loop */ ;
|
/* loop */ ;
|
||||||
|
|
||||||
return wxExecute(argv, sync);
|
return wxExecute(argv, sync, handler);
|
||||||
#endif
|
#endif
|
||||||
// VMS
|
// VMS
|
||||||
}
|
}
|
||||||
|
@@ -90,11 +90,8 @@ void WXSERIAL(wxBitmap)::LoadObject(wxObjectInputStream& s)
|
|||||||
w = data_s.Read16();
|
w = data_s.Read16();
|
||||||
h = data_s.Read16();
|
h = data_s.Read16();
|
||||||
|
|
||||||
#ifdef __WXGTK__
|
bitmap->SetWidth(w);
|
||||||
bitmap->Resize(w, h);
|
bitmap->SetHeight(h);
|
||||||
#else
|
|
||||||
bitmap->Create(w, h);
|
|
||||||
#endif
|
|
||||||
dc.SelectObject(*bitmap);
|
dc.SelectObject(*bitmap);
|
||||||
|
|
||||||
for (y=0;y<h;y++)
|
for (y=0;y<h;y++)
|
||||||
|
Reference in New Issue
Block a user