diff --git a/main.cpp b/main.cpp index e643dcf..aa506ce 100644 --- a/main.cpp +++ b/main.cpp @@ -74,11 +74,16 @@ download(const string& address) { exit(1); } - - curl_easy_cleanup(curl); + if(!res) { + /* check the size */ + double dla; + res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD, &dla); + if(!res) { + cerr << "Download size " << dla << " bytes\n" ; } + } - return input_data(buffer, false); + } } @@ -96,5 +101,7 @@ auto bins = make_histogram(in.numbers, in.bin_count); show_histogram_svg ( bins ); + + return 0; }