I've two questions regarding coding with apr_file_ family
1. Is it a good idea to apr_file_mktemp with APR_BUFFERED flag on? The
current default is off.
2. What's the idiomatic apr read till eof? From grepping the source
code, I see apr_file_eof is hardly ever used. Is something wrong with:
Stas Bekman <[EMAIL PROTECTED]> writes:
> 2. What's the idiomatic apr read till eof? From grepping the source
> code, I see apr_file_eof is hardly ever used. Is something wrong with:
>
> while (!apr_file_eof(fp)) {
> rc = apr_file_read(fp, buf, &nbytes);
> ...
>
Jeff Trawick wrote:
Stas Bekman <[EMAIL PROTECTED]> writes:
2. What's the idiomatic apr read till eof? From grepping the source
code, I see apr_file_eof is hardly ever used. Is something wrong with:
while (!apr_file_eof(fp)) {
rc = apr_file_read(fp, buf, &nbytes);
.
On 18 Apr 2002, Jeff Trawick wrote:
Since APR_EOF is one of the errors you might get back from
apr_file_read(), I agree with Jeff. This:
> > while (apr_file_read(file, buffer, &len) != APR_SUCCESS)
> > {
> > ...
> > }
is probably preferable. You'll most l
Stas Bekman <[EMAIL PROTECTED]> writes:
> Jeff Trawick wrote:
> > Stas Bekman <[EMAIL PROTECTED]> writes:
> >
> >>2. What's the idiomatic apr read till eof? From grepping the source
> >>code, I see apr_file_eof is hardly ever used. Is something wrong with:
> >>
> >> while (!apr_file_eof(fp
On Thu, Apr 18, 2002 at 10:40:12AM -0400, Cliff Woolley wrote:
> On 18 Apr 2002, Jeff Trawick wrote:
>
> Since APR_EOF is one of the errors you might get back from
> apr_file_read(), I agree with Jeff. This:
>
> > > while (apr_file_read(file, buffer, &len) != APR_SUCCESS)
> > >
Cliff Woolley wrote:
On 18 Apr 2002, Jeff Trawick wrote:
Since APR_EOF is one of the errors you might get back from
apr_file_read(), I agree with Jeff. This:
while (apr_file_read(file, buffer, &len) != APR_SUCCESS)
{
...
}
is probably preferable. You'll most l