cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: FTP large file support patch

From: Dave Meyer <meyer_at_paracel.com>
Date: Wed, 10 Dec 2003 16:27:36 -0800 (PST)

> Here's where I would like to chime in! I would rather have new options that
> ...
>
> CURLOPT_RESUME_FROM
> CURLOPT_INFILESIZE
> CURLOPT_MAXFILESIZE
> CURLOPT_PROGRESSFUNCTION (the new version of this would take a function
> pointer to a function that accepts off_t arguments for the sizes).
>
> Perhaps appending "_BIG" is fine? Or "_NEW"?
>
> I would also like to see the 'off_t' handling get its own CURLOPTTYPE in the
> curl.h file (similar to how CURLOPTTYPE_OBJECTPOINT is used etc) so that it
> ...

Here's the new patch.

I've changed the original CURLOPT_xxx values back to using longs, and
added new CURLOPT_xxx_BIG versions which take off_t's. Internally, the
library always uses off_t's, since those can hold longs without any
difficulty (unless there's some system out there that has smaller than
4-byte file offsets...). I've updated the documentation for the originals
back to what they were, and added documentation for the new values. I
didn't document anything about the originals being deprecated, though -- I
don't know whether you were just speculating or not when you mentioned
that.

I also added the CURLOPTTYPE_OFF_T, and added the _BIG options in as that
type. This allowed me to clean up my changes to easy.c, so they match the
existing checks for parameter type.

The one thing I did *not* do was the changes for CURLOPT_PROGRESSFUNCTION.
The current progress function takes doubles (or, rather, that's how its
prototype is written), which are already large enough to hold 64-bit
integer values (with some slight loss of precision, of course). Thus, I
didn't add a new one that took off_t's, since it looked like the current
function would work properly with off_t's to begin with.

Perhaps I misunderstood your reasoning for having a new progress function,
or maybe I misread; if so, please let me know, and I can address that. :)

Thanks,

Dave

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click

Received on 2003-12-11