-wxMemoryStreamBase::wxMemoryStreamBase(char *data, size_t length, int iolimit)
-{
- m_buffer = data;
- m_iolimit = iolimit;
- m_persistent = FALSE;
- m_length = length;
- m_position_i = m_position_o = 0;
-}
-
-wxMemoryStreamBase::~wxMemoryStreamBase()
-{
- free(m_buffer);
-}
-
-wxInputStream& wxMemoryStreamBase::Read(void *buffer, size_t size)
-{
- if (m_iolimit == 2) {
- m_eof = TRUE;
- return *this;
- }
- if (m_position_i+size > m_length)
- size = m_length-m_position_i;