cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: bug/feature in progress?

From: David Byron <DByron_at_everdreamcorp.com>
Date: Wed, 21 May 2003 09:43:49 -0700

On Wed, 21 May 2003, Daniel Steinberg wrote:

> On Mon, 19 May 2003, David Byron wrote:
>
> > I see the same kind of 'start-at-0' behavior when using
> > --progress-bar. My end goal has me writing my own progress function
> > that sends the info to a remote site, so I want to make
> > sure the info passed to the progress function is correct.
> >
>
> I think the only "problem" that prevents you from simply
> adding the original size to one of the counters above is that
> there's this optional progress callback function that
> applications (users of libcurl) can use, and that is defined
> to get the expected download/upload sizes, not the size of
> the complete file. This progress callback is what curl uses
> to make the progress-bar output...

I've attached my patch in case anyone's interested. Probably shouldn't
have, but I couldn't resist removing the total field from ProgressData since
it wasn't used, and moving point from there to a local in the myprogress
function.

-DB

--
David Byron                   dbyron_at_everdream.com
Everdream                     http://www.everdream.com
6591 Dumbarton Circle         voice:(510)818-5550
Fremont, CA  94555            fax:(510)818-5510

-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge

Received on 2003-05-21