+inline bool wxTextInputStream::EatEOL(const wxChar &c)
+{
+ if (c == wxT('\n')) return TRUE; // eat on UNIX
+
+ if (c == wxT('\r')) // eat on both Mac and DOS
+ {
+ if (!m_input) return TRUE;
+ wxChar c2 = m_input.GetC();
+
+ if (c2 != wxT('\n')) m_input.Ungetch( c2 ); // Don't eat on Mac
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+void wxTextInputStream::SkipIfEndOfLine( wxChar c )
+{
+ if (EatEOL(c)) return;
+ else m_input.Ungetch( c ); // no line terminator
+}
+
+wxUint32 wxTextInputStream::Read32()
+{
+ /* I only implemented a simple integer parser */
+ int sign;
+ wxInt32 i;
+
+ if (!m_input) return 0;
+ int c = NextNonSeparators();
+ if (c==(wxChar)0) return 0;
+
+ i = 0;
+ if (! (c == wxT('-') || c == wxT('+') || isdigit(c)) )
+ {
+ m_input.Ungetch(c);
+ return 0;
+ }