apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Bloom" <...@covalent.net>
Subject RE: apr_file_gets return code
Date Wed, 13 Mar 2002 14:48:11 GMT
This has been discussed before, and the decision was that return EOF
allows programmers to notice the EOF immediately and not call
apr_file_gets again.  That decision can be changed, but I rather like
that I can remove one call to the function.




Ryan Bloom                  rbb@covalent.net
645 Howard St.              rbb@apache.org
San Francisco, CA 

-----Original Message-----
From: Aaron M. Folmsbee [mailto:aaron@folmsbee.com] 
Sent: Tuesday, March 12, 2002 11:39 PM
To: dev@apr.apache.org
Subject: apr_file_gets return code


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. 

View raw message