bug fixes; more docs; lots of new testing

git-svn-id: svn://10.0.0.236/trunk@6315 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rickg%netscape.com
1998-07-23 21:10:19 +00:00
parent 4ab5768050
commit 55ada9fcc7
12 changed files with 44 additions and 140 deletions

View File

@@ -257,7 +257,11 @@ nsresult CScanner::Eof() {
* @return error code reflecting read status
*/
nsresult CScanner::GetChar(PRUnichar& aChar) {
nsresult result=Eof();
nsresult result=NS_OK;
if(mOffset>=mBuffer.Length())
result=Eof();
if(NS_OK == result) {
aChar=mBuffer[mOffset++];
}
@@ -274,7 +278,11 @@ nsresult CScanner::GetChar(PRUnichar& aChar) {
* @return
*/
nsresult CScanner::Peek(PRUnichar& aChar) {
nsresult result=Eof();
nsresult result=NS_OK;
if(mOffset>=mBuffer.Length())
result=Eof();
if(NS_OK == result) {
aChar=mBuffer[mOffset];
}