+ if (c == wxT('\r')) // eat on both Mac and DOS
+ {
+ wxChar c2 = NextChar();
+ if(c2 == wxEOT) return true; // end of stream reached, had enough :-)
+
+ if (c2 != wxT('\n')) UngetLast(); // Don't eat on Mac
+ return true;
+ }
+
+ return false;
+}
+
+wxUint32 wxTextInputStream::Read32(int base)
+{
+ wxASSERT_MSG( !base || (base > 1 && base <= 36), _T("invalid base") );
+ if(!m_input) return 0;
+
+ wxString word = ReadWord();
+ if(word.IsEmpty())
+ return 0;
+ return wxStrtoul(word.c_str(), 0, base);
+}
+
+wxUint16 wxTextInputStream::Read16(int base)
+{
+ return (wxUint16)Read32(base);
+}
+
+wxUint8 wxTextInputStream::Read8(int base)
+{
+ return (wxUint8)Read32(base);