Removed NS_BASE_STREAM_EOF in favor of returning a count of 0 from Read to indicate EOF. Renamed GetLength to Available. Fixed a number of places where AppendElement's broken error code wasn't checked.

git-svn-id: svn://10.0.0.236/trunk@46637 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
warren%netscape.com
1999-09-09 22:05:05 +00:00
parent bf00f6cff0
commit de60d2685c
75 changed files with 181 additions and 187 deletions

View File

@@ -77,7 +77,7 @@ public:
return NS_OK;
}
NS_IMETHOD GetLength(PRUint32 *_retval) {
NS_IMETHOD Available(PRUint32 *_retval) {
if (!mResult) {
nsresult rv = Eval();
if (NS_FAILED(rv))
@@ -86,7 +86,7 @@ public:
}
PRUint32 rest = mLength - mReadCursor;
if (!rest)
return NS_BASE_STREAM_EOF;
return NS_ERROR_FAILURE;
*_retval = rest;
return NS_OK;
}
@@ -94,7 +94,7 @@ public:
NS_IMETHOD Read(char * buf, PRUint32 count, PRUint32 *_retval) {
nsresult rv;
PRUint32 rest;
rv = GetLength(&rest);
rv = Available(&rest);
if (rv != NS_OK)
return rv;
PRUint32 amt = PR_MIN(count, rest);