+char *wxInputStream::AllocSpaceWBack(size_t needed_size)
+{
+ char *temp_b;
+ size_t old_size;
+
+ old_size = m_wbacksize;
+ m_wbacksize += needed_size;
+
+ if (!m_wback)
+ temp_b = (char *)malloc(m_wbacksize);
+ else
+ temp_b = (char *)realloc(m_wback, m_wbacksize);
+
+ if (!temp_b)
+ return NULL;
+ m_wback = temp_b;
+ m_wbackcur += needed_size;
+
+ memmove(m_wback+needed_size, m_wback, old_size);
+
+ return (char *)(m_wback);
+}
+
+size_t wxInputStream::GetWBack(char *buf, size_t bsize)
+{
+ size_t s_toget = m_wbackcur;
+
+ if (!m_wback)
+ return 0;
+
+ if (bsize < s_toget)
+ s_toget = bsize;
+
+ memcpy(buf, (m_wback+m_wbackcur-bsize), s_toget);
+
+ m_wbackcur -= s_toget;
+ if (m_wbackcur == 0) {
+ free(m_wback);
+ m_wback = (char *)NULL;
+ m_wbacksize = 0;
+ m_wbackcur = 0;
+ }
+
+ return s_toget;
+}
+
+size_t wxInputStream::Ungetch(const void *buf, size_t bufsize)