cURL / Mailing Lists / curl-users / Single Mail

curl-users

deprecated -c switch

From: Robert Linden <rob_at_superhelden.de>
Date: Wed, 28 Feb 2001 16:05:49 +0100

Hi Daniel & Co,

I got the new curl-version (7.6.1) and see that -c is now deprecated, and
has been replaced by -C. With -C I have to give the offset myself, and it
therefore doesn't work with multiple-resumes from different offsets each. At
least that's how I understand it. I liked -c but it also doesn't work with
multiple files, because it only get's the file-size once. I fixed that with
the following patch to main.c:

[twi_at_nosferatu /home/twi/incoming/curl-7.6.1/src]$ diff main.c main_rob.c
313a314
> bool auto_resume_from;
740a742
> config->auto_resume_from=TRUE;
744a747
> config->auto_resume_from=FALSE;
1617c1620
< if((0 == config->resume_from) && config->use_resume) {

---
>         if(config->auto_resume_from && config->use_resume) {
This utilises a new configuration-variable "auto_resume_from" which is set
for -c and unset for -C. The problem was that "resume_from" wasn't 0 after
the first file, so for subsequent ones the new offset wasn't calculated.
I'm not sure if this works in all situations, but for me it seems to do
the job.
All the best,
rob
-- 
----------------------------------------------------------------------------
          Please note: I've got a new address:  rob_at_superhelden.de
                 Don't send mail to linden_at_rhein.com anymore
----------------------------------------------------------------------------
Received on 2001-02-28