git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42623
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxSTREAM_READ_ERROR // generic read error
};
wxSTREAM_READ_ERROR // generic read error
};
// ============================================================================
// base stream classes: wxInputStream and wxOutputStream
// ============================================================================
// ============================================================================
// base stream classes: wxInputStream and wxOutputStream
// ============================================================================
// undefined), otherwise 1
virtual char Peek();
// undefined), otherwise 1
virtual char Peek();
- // return one character from the stream, blocking until it appears if
+ // return one byte from the stream, blocking until it appears if
- // if EOF, return value is undefined and LastRead() will return 0 and not 1
- char GetC();
+ // on success returns a value between 0 - 255, or wxEOF on EOF or error.
+ int GetC();
// read at most the given number of bytes from the stream
//
// read at most the given number of bytes from the stream
//
return Ungetch(&c, sizeof(c)) != 0;
}
return Ungetch(&c, sizeof(c)) != 0;
}
-char wxInputStream::GetC()
+int wxInputStream::GetC()
+ return LastRead() ? c : wxEOF;
}
wxInputStream& wxInputStream::Read(void *buf, size_t size)
}
wxInputStream& wxInputStream::Read(void *buf, size_t size)