apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: apr_file_gets return code
Date Wed, 13 Mar 2002 14:55:06 GMT
"Aaron M. Folmsbee" <aaron@folmsbee.com> writes:

> apr_file_gets returns APR_EOF if it encounters an eof condition ( or any
> error condition...) while there is still room left in the read buffer. 
> This means that APR_EOF is returned if you read the last line in a file
> with a buffer larger then the last line. I would submit that the correct
> behaviour is to return success if anything is read before encountering
> the eof.

I think I agree with your comment about the proper behavior: It should
return APR_SUCCESS if it read any bytes into the caller's buffer.

What OS did you encounter the problem on?

Was there a '\n' at the end of the file?

Do you have a patch?

Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...

View raw message