cURL / Mailing Lists / curl-users / Single Mail


[EXAMPLE] using wget progress functions

From: Juan F. Codagnone <>
Date: Thu, 12 Jun 2003 10:30:39 -0300


I made this functions some months ago, and i think that someone can find them
usefull (note that only gpl programs can use it).It's an interface so you
can use wget's progress-bar using libcurl.

It seems to work fine on windows and linux. All you need is self contained in
progress.c) with the exception that you will need to delete the #include
<glib.h> and #include "i18n.h" and redefine xfree xmalloc and xrealloc (wget
used this functions) if you don't want to use glib.

you can see some screenshots at:

i use it writing something like:
        if( isatty(fileno(stdout)) )
                 fnc = bar_progress_callback;
                 fnc = dot_progress_callback;
        curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, fnc);
        progress = new_progress_callback(fnc);
        curl_easy_setopt(curl, CURLOPT_URL, url);
        res = curl_easy_perform(curl);

(it isn't beautiful but it works)

Best wishes,

Buenos Aires, Argentina                           12C with winds at 14 km/h N

This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:

  • application/pgp-signature attachment: signature
Received on 2003-06-12