+wxChar wxTextInputStream::NextNonSeparators()
+{
+ wxChar c = (wxChar) 0;
+ for (;;)
+ {
+ if (!m_input) return (wxChar) 0;
+ c = m_input.GetC();
+
+ if (c != wxT('\n') &&
+ c != wxT('\r') &&
+ !m_separators.Contains(c))
+ return c;
+ }
+
+}
+
+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
+}
+