Index: urlwrite.cc =================================================================== RCS file: /cvs/octave/src/DLD-FUNCTIONS/urlwrite.cc,v retrieving revision 1.12 diff -u -r1.12 urlwrite.cc --- urlwrite.cc 9 Oct 2007 17:43:00 -0000 1.12 +++ urlwrite.cc 9 Oct 2007 20:29:07 -0000 @@ -58,6 +58,19 @@ return (stream.fail () ? 0 : size * nmemb); } + +// Progress callback function for curl. + +int +progress_func (const char /**url*/, double /*dltotal*/, double /*dlnow*/, + double /*ultotal*/, double /*ulnow*/) +{ + // macro that picks up Ctrl-C signalling + OCTAVE_QUIT; + return 0; +} + + // Form the query string based on param. static std::string @@ -131,6 +144,7 @@ curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, 1); curl_easy_setopt (curl, CURLOPT_NOPROGRESS, false); + curl_easy_setopt (curl, CURLOPT_PROGRESSFUNCTION, progress_func); curl_easy_setopt (curl, CURLOPT_PROGRESSDATA, url.c_str ()); curl_easy_setopt (curl, CURLOPT_FAILONERROR, true);