* wxStream fixes (integer/line parsing).

* Typetest sample fixes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Guilhem Lavaux 1999-06-28 18:22:04 +00:00
parent c693edf3bc
commit b6bff3019e
3 changed files with 8 additions and 3 deletions

View File

@ -167,6 +167,8 @@ void MyApp::DoStreamDemo(wxCommandEvent& WXUNUSED(event))
textCtrl.WriteText( tmp );
textCtrl.WriteText( "\nReading from wxFileInputStream:\n" );
file_output.OutputStreamBuffer()->FlushBuffer();
wxFileInputStream file_input( "test_wx.dat" );

View File

@ -90,6 +90,9 @@ wxString wxDataInputStream::ReadLine()
while (!end_line) {
c = GetC();
if (LastError() != wxStream_NOERROR)
break;
switch (c) {
case '\n':
end_line = TRUE;
@ -201,4 +204,4 @@ void wxDataOutputStream::WriteDouble(double d)
#endif
// wxUSE_STREAMS

View File

@ -648,7 +648,7 @@ wxInputStream& wxInputStream::operator>>(signed long& i)
}
while (isdigit(c)) {
i = i*10 + c;
i = i*10 + (c - (int)'0');
c = GetC();
}
@ -690,7 +690,7 @@ wxInputStream& wxInputStream::operator>>(unsigned long& i)
}
while (isdigit(c)) {
i = i*10 + c;
i = i*10 + c - '0';
c = GetC();
}