Date: Sun, 27 May 2007 11:45:48 +0200
2007/5/27, Caner Bulut <canerblt_at_gmail.com>:
> I am codding a program that use libcurl library.But when i download
> files from internet (ftp, http),i cant show progreses for each file.I
> want to show different progresses for each file on console only. But i
> cant.I assume that my problem with CURLOPT_PROGRESSFUNCTION.Dou you
> have any example or an document to help my problem.
You'll have to create your own function that is capable of writing different
progress meters on different lines in the terminal. The first argument of
your callback progress function is useful when determining which line to
update, since this may be any value at your choice (probably a pointer).
Keep a "status buffer" for each download and somehow write them to their
specific terminal line in when changed. This can be done in many ways, you
could use ncurses, or you could clear the terminal on each update followed
by writing all buffers line by line. I don't know the best approach.
If you're running multiple easy handles in multiple threads at once, don't
forget that you'll probably need to perform some locking in your callback
function or you'll get very unexpected results.
I don't think there is any documentation or example for this specifically,
but all you need is a good way of writing text on specific terminal lines.
I'm planning of implementing this within two weeks in my own program, if
you're out of success on your own after that I can return to you with my
Thank you very much.
> Caner Bulut.
Received on 2007-05-27