Added some unit tests for Stream::readLine_NEW, and clarified that readLine_NEW is essentially fgets in disguise
svn-id: r34384
This commit is contained in:
parent
5756308cec
commit
6cb09e311a
3 changed files with 53 additions and 18 deletions
|
@ -166,9 +166,12 @@ char *SeekableReadStream::readLine_NEW(char *buf, size_t bufSize) {
|
|||
c = readByte();
|
||||
|
||||
// If end-of-file occurs before any characters are read, return
|
||||
// NULL and the buffer contents remain unchanged. If an error
|
||||
/// occurs, return NULL and the buffer contents are indeterminate.
|
||||
if (ioFailed() || (len == 0 && eos()))
|
||||
// NULL and the buffer contents remain unchanged.
|
||||
if (len == 0 && eos())
|
||||
return 0;
|
||||
|
||||
// If an error occurs, return NULL and the buffer contents are indeterminate.
|
||||
if (ioFailed())
|
||||
return 0;
|
||||
|
||||
// Check for CR or CR/LF
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue