progress.c
Go to the documentation of this file.
00001 /***************************************************************************
00002  *                                  _   _ ____  _
00003  *  Project                     ___| | | |  _ \| |
00004  *                             / __| | | | |_) | |
00005  *                            | (__| |_| |  _ <| |___
00006  *                             \___|\___/|_| \_\_____|
00007  *
00008  * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
00009  *
00010  * This software is licensed as described in the file COPYING, which
00011  * you should have received as part of this distribution. The terms
00012  * are also available at https://curl.haxx.se/docs/copyright.html.
00013  *
00014  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
00015  * copies of the Software, and permit persons to whom the Software is
00016  * furnished to do so, under the terms of the COPYING file.
00017  *
00018  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
00019  * KIND, either express or implied.
00020  *
00021  ***************************************************************************/
00022 
00023 #include "curl_setup.h"
00024 
00025 #include "urldata.h"
00026 #include "sendf.h"
00027 #include "progress.h"
00028 #include "curl_printf.h"
00029 
00030 /* Provide a string that is 2 + 1 + 2 + 1 + 2 = 8 letters long (plus the zero
00031    byte) */
00032 static void time2str(char *r, curl_off_t seconds)
00033 {
00034   curl_off_t d, h, m, s;
00035   if(seconds <= 0) {
00036     strcpy(r, "--:--:--");
00037     return;
00038   }
00039   h = seconds / CURL_OFF_T_C(3600);
00040   if(h <= CURL_OFF_T_C(99)) {
00041     m = (seconds - (h*CURL_OFF_T_C(3600))) / CURL_OFF_T_C(60);
00042     s = (seconds - (h*CURL_OFF_T_C(3600))) - (m*CURL_OFF_T_C(60));
00043     snprintf(r, 9, "%2" CURL_FORMAT_CURL_OFF_T ":%02" CURL_FORMAT_CURL_OFF_T
00044              ":%02" CURL_FORMAT_CURL_OFF_T, h, m, s);
00045   }
00046   else {
00047     /* this equals to more than 99 hours, switch to a more suitable output
00048        format to fit within the limits. */
00049     d = seconds / CURL_OFF_T_C(86400);
00050     h = (seconds - (d*CURL_OFF_T_C(86400))) / CURL_OFF_T_C(3600);
00051     if(d <= CURL_OFF_T_C(999))
00052       snprintf(r, 9, "%3" CURL_FORMAT_CURL_OFF_T
00053                "d %02" CURL_FORMAT_CURL_OFF_T "h", d, h);
00054     else
00055       snprintf(r, 9, "%7" CURL_FORMAT_CURL_OFF_T "d", d);
00056   }
00057 }
00058 
00059 /* The point of this function would be to return a string of the input data,
00060    but never longer than 5 columns (+ one zero byte).
00061    Add suffix k, M, G when suitable... */
00062 static char *max5data(curl_off_t bytes, char *max5)
00063 {
00064 #define ONE_KILOBYTE  CURL_OFF_T_C(1024)
00065 #define ONE_MEGABYTE (CURL_OFF_T_C(1024) * ONE_KILOBYTE)
00066 #define ONE_GIGABYTE (CURL_OFF_T_C(1024) * ONE_MEGABYTE)
00067 #define ONE_TERABYTE (CURL_OFF_T_C(1024) * ONE_GIGABYTE)
00068 #define ONE_PETABYTE (CURL_OFF_T_C(1024) * ONE_TERABYTE)
00069 
00070   if(bytes < CURL_OFF_T_C(100000))
00071     snprintf(max5, 6, "%5" CURL_FORMAT_CURL_OFF_T, bytes);
00072 
00073   else if(bytes < CURL_OFF_T_C(10000) * ONE_KILOBYTE)
00074     snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "k", bytes/ONE_KILOBYTE);
00075 
00076   else if(bytes < CURL_OFF_T_C(100) * ONE_MEGABYTE)
00077     /* 'XX.XM' is good as long as we're less than 100 megs */
00078     snprintf(max5, 6, "%2" CURL_FORMAT_CURL_OFF_T ".%0"
00079              CURL_FORMAT_CURL_OFF_T "M", bytes/ONE_MEGABYTE,
00080              (bytes%ONE_MEGABYTE) / (ONE_MEGABYTE/CURL_OFF_T_C(10)) );
00081 
00082 #if (CURL_SIZEOF_CURL_OFF_T > 4)
00083 
00084   else if(bytes < CURL_OFF_T_C(10000) * ONE_MEGABYTE)
00085     /* 'XXXXM' is good until we're at 10000MB or above */
00086     snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "M", bytes/ONE_MEGABYTE);
00087 
00088   else if(bytes < CURL_OFF_T_C(100) * ONE_GIGABYTE)
00089     /* 10000 MB - 100 GB, we show it as XX.XG */
00090     snprintf(max5, 6, "%2" CURL_FORMAT_CURL_OFF_T ".%0"
00091              CURL_FORMAT_CURL_OFF_T "G", bytes/ONE_GIGABYTE,
00092              (bytes%ONE_GIGABYTE) / (ONE_GIGABYTE/CURL_OFF_T_C(10)) );
00093 
00094   else if(bytes < CURL_OFF_T_C(10000) * ONE_GIGABYTE)
00095     /* up to 10000GB, display without decimal: XXXXG */
00096     snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "G", bytes/ONE_GIGABYTE);
00097 
00098   else if(bytes < CURL_OFF_T_C(10000) * ONE_TERABYTE)
00099     /* up to 10000TB, display without decimal: XXXXT */
00100     snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "T", bytes/ONE_TERABYTE);
00101 
00102   else
00103     /* up to 10000PB, display without decimal: XXXXP */
00104     snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "P", bytes/ONE_PETABYTE);
00105 
00106     /* 16384 petabytes (16 exabytes) is the maximum a 64 bit unsigned number
00107        can hold, but our data type is signed so 8192PB will be the maximum. */
00108 
00109 #else
00110 
00111   else
00112     snprintf(max5, 6, "%4" CURL_FORMAT_CURL_OFF_T "M", bytes/ONE_MEGABYTE);
00113 
00114 #endif
00115 
00116   return max5;
00117 }
00118 
00119 /*
00120 
00121    New proposed interface, 9th of February 2000:
00122 
00123    pgrsStartNow() - sets start time
00124    pgrsSetDownloadSize(x) - known expected download size
00125    pgrsSetUploadSize(x) - known expected upload size
00126    pgrsSetDownloadCounter() - amount of data currently downloaded
00127    pgrsSetUploadCounter() - amount of data currently uploaded
00128    pgrsUpdate() - show progress
00129    pgrsDone() - transfer complete
00130 
00131 */
00132 
00133 int Curl_pgrsDone(struct connectdata *conn)
00134 {
00135   int rc;
00136   struct Curl_easy *data = conn->data;
00137   data->progress.lastshow=0;
00138   rc = Curl_pgrsUpdate(conn); /* the final (forced) update */
00139   if(rc)
00140     return rc;
00141 
00142   if(!(data->progress.flags & PGRS_HIDE) &&
00143      !data->progress.callback)
00144     /* only output if we don't use a progress callback and we're not
00145      * hidden */
00146     fprintf(data->set.err, "\n");
00147 
00148   data->progress.speeder_c = 0; /* reset the progress meter display */
00149   return 0;
00150 }
00151 
00152 /* reset all times except redirect, and reset the known transfer sizes */
00153 void Curl_pgrsResetTimesSizes(struct Curl_easy *data)
00154 {
00155   data->progress.t_nslookup = 0.0;
00156   data->progress.t_connect = 0.0;
00157   data->progress.t_pretransfer = 0.0;
00158   data->progress.t_starttransfer = 0.0;
00159 
00160   Curl_pgrsSetDownloadSize(data, -1);
00161   Curl_pgrsSetUploadSize(data, -1);
00162 }
00163 
00164 void Curl_pgrsTime(struct Curl_easy *data, timerid timer)
00165 {
00166   struct timeval now = Curl_tvnow();
00167 
00168   switch(timer) {
00169   default:
00170   case TIMER_NONE:
00171     /* mistake filter */
00172     break;
00173   case TIMER_STARTOP:
00174     /* This is set at the start of a transfer */
00175     data->progress.t_startop = now;
00176     break;
00177   case TIMER_STARTSINGLE:
00178     /* This is set at the start of each single fetch */
00179     data->progress.t_startsingle = now;
00180     break;
00181 
00182   case TIMER_STARTACCEPT:
00183     data->progress.t_acceptdata = Curl_tvnow();
00184     break;
00185 
00186   case TIMER_NAMELOOKUP:
00187     data->progress.t_nslookup =
00188       Curl_tvdiff_secs(now, data->progress.t_startsingle);
00189     break;
00190   case TIMER_CONNECT:
00191     data->progress.t_connect =
00192       Curl_tvdiff_secs(now, data->progress.t_startsingle);
00193     break;
00194   case TIMER_APPCONNECT:
00195     data->progress.t_appconnect =
00196       Curl_tvdiff_secs(now, data->progress.t_startsingle);
00197     break;
00198   case TIMER_PRETRANSFER:
00199     data->progress.t_pretransfer =
00200       Curl_tvdiff_secs(now, data->progress.t_startsingle);
00201     break;
00202   case TIMER_STARTTRANSFER:
00203     data->progress.t_starttransfer =
00204       Curl_tvdiff_secs(now, data->progress.t_startsingle);
00205     break;
00206   case TIMER_POSTRANSFER:
00207     /* this is the normal end-of-transfer thing */
00208     break;
00209   case TIMER_REDIRECT:
00210     data->progress.t_redirect = Curl_tvdiff_secs(now, data->progress.start);
00211     break;
00212   }
00213 }
00214 
00215 void Curl_pgrsStartNow(struct Curl_easy *data)
00216 {
00217   data->progress.speeder_c = 0; /* reset the progress meter display */
00218   data->progress.start = Curl_tvnow();
00219   data->progress.ul_limit_start.tv_sec = 0;
00220   data->progress.ul_limit_start.tv_usec = 0;
00221   data->progress.dl_limit_start.tv_sec = 0;
00222   data->progress.dl_limit_start.tv_usec = 0;
00223   /* clear all bits except HIDE and HEADERS_OUT */
00224   data->progress.flags &= PGRS_HIDE|PGRS_HEADERS_OUT;
00225 }
00226 
00227 /*
00228  * This is used to handle speed limits, calculating how much milliseconds we
00229  * need to wait until we're back under the speed limit, if needed.
00230  *
00231  * The way it works is by having a "starting point" (time & amount of data
00232  * transfered by then) used in the speed computation, to be used instead of the
00233  * start of the transfer.
00234  * This starting point is regularly moved as transfer goes on, to keep getting
00235  * accurate values (instead of average over the entire tranfer).
00236  *
00237  * This function takes the current amount of data transfered, the amount at the
00238  * starting point, the limit (in bytes/s), the time of the starting point and
00239  * the current time.
00240  *
00241  * Returns -1 if no waiting is needed (not enough data transfered since
00242  * starting point yet), 0 when no waiting is needed but the starting point
00243  * should be reset (to current), or the number of milliseconds to wait to get
00244  * back under the speed limit.
00245  */
00246 long Curl_pgrsLimitWaitTime(curl_off_t cursize,
00247                             curl_off_t startsize,
00248                             curl_off_t limit,
00249                             struct timeval start,
00250                             struct timeval now)
00251 {
00252   curl_off_t size = cursize - startsize;
00253   time_t minimum;
00254   time_t actual;
00255 
00256   /* we don't have a starting point yet -- return 0 so it gets (re)set */
00257   if(start.tv_sec == 0 && start.tv_usec == 0)
00258     return 0;
00259 
00260   /* not enough data yet */
00261   if(size < limit)
00262     return -1;
00263 
00264   minimum = (time_t) (CURL_OFF_T_C(1000) * size / limit);
00265   actual = Curl_tvdiff(now, start);
00266 
00267   if(actual < minimum)
00268     /* this is a conversion on some systems (64bit time_t => 32bit long) */
00269     return (long)(minimum - actual);
00270   else
00271     return 0;
00272 }
00273 
00274 void Curl_pgrsSetDownloadCounter(struct Curl_easy *data, curl_off_t size)
00275 {
00276   struct timeval now = Curl_tvnow();
00277 
00278   data->progress.downloaded = size;
00279 
00280   /* download speed limit */
00281   if((data->set.max_recv_speed > 0) &&
00282      (Curl_pgrsLimitWaitTime(data->progress.downloaded,
00283                              data->progress.dl_limit_size,
00284                              data->set.max_recv_speed,
00285                              data->progress.dl_limit_start,
00286                              now) == 0)) {
00287     data->progress.dl_limit_start = now;
00288     data->progress.dl_limit_size = size;
00289   }
00290 }
00291 
00292 void Curl_pgrsSetUploadCounter(struct Curl_easy *data, curl_off_t size)
00293 {
00294   struct timeval now = Curl_tvnow();
00295 
00296   data->progress.uploaded = size;
00297 
00298   /* upload speed limit */
00299   if((data->set.max_send_speed > 0) &&
00300      (Curl_pgrsLimitWaitTime(data->progress.uploaded,
00301                              data->progress.ul_limit_size,
00302                              data->set.max_send_speed,
00303                              data->progress.ul_limit_start,
00304                              now) == 0)) {
00305     data->progress.ul_limit_start = now;
00306     data->progress.ul_limit_size = size;
00307   }
00308 }
00309 
00310 void Curl_pgrsSetDownloadSize(struct Curl_easy *data, curl_off_t size)
00311 {
00312   if(size >= 0) {
00313     data->progress.size_dl = size;
00314     data->progress.flags |= PGRS_DL_SIZE_KNOWN;
00315   }
00316   else {
00317     data->progress.size_dl = 0;
00318     data->progress.flags &= ~PGRS_DL_SIZE_KNOWN;
00319   }
00320 }
00321 
00322 void Curl_pgrsSetUploadSize(struct Curl_easy *data, curl_off_t size)
00323 {
00324   if(size >= 0) {
00325     data->progress.size_ul = size;
00326     data->progress.flags |= PGRS_UL_SIZE_KNOWN;
00327   }
00328   else {
00329     data->progress.size_ul = 0;
00330     data->progress.flags &= ~PGRS_UL_SIZE_KNOWN;
00331   }
00332 }
00333 
00334 /*
00335  * Curl_pgrsUpdate() returns 0 for success or the value returned by the
00336  * progress callback!
00337  */
00338 int Curl_pgrsUpdate(struct connectdata *conn)
00339 {
00340   struct timeval now;
00341   int result;
00342   char max5[6][10];
00343   curl_off_t dlpercen=0;
00344   curl_off_t ulpercen=0;
00345   curl_off_t total_percen=0;
00346   curl_off_t total_transfer;
00347   curl_off_t total_expected_transfer;
00348   curl_off_t timespent;
00349   struct Curl_easy *data = conn->data;
00350   int nowindex = data->progress.speeder_c% CURR_TIME;
00351   int checkindex;
00352   int countindex; /* amount of seconds stored in the speeder array */
00353   char time_left[10];
00354   char time_total[10];
00355   char time_spent[10];
00356   curl_off_t ulestimate=0;
00357   curl_off_t dlestimate=0;
00358   curl_off_t total_estimate;
00359   bool shownow=FALSE;
00360 
00361   now = Curl_tvnow(); /* what time is it */
00362 
00363   /* The time spent so far (from the start) */
00364   data->progress.timespent = curlx_tvdiff_secs(now, data->progress.start);
00365   timespent = (curl_off_t)data->progress.timespent;
00366 
00367   /* The average download speed this far */
00368   data->progress.dlspeed = (curl_off_t)
00369     ((double)data->progress.downloaded/
00370      (data->progress.timespent>0?data->progress.timespent:1));
00371 
00372   /* The average upload speed this far */
00373   data->progress.ulspeed = (curl_off_t)
00374     ((double)data->progress.uploaded/
00375      (data->progress.timespent>0?data->progress.timespent:1));
00376 
00377   /* Calculations done at most once a second, unless end is reached */
00378   if(data->progress.lastshow != now.tv_sec) {
00379     shownow = TRUE;
00380 
00381     data->progress.lastshow = now.tv_sec;
00382 
00383     /* Let's do the "current speed" thing, which should use the fastest
00384        of the dl/ul speeds. Store the faster speed at entry 'nowindex'. */
00385     data->progress.speeder[ nowindex ] =
00386       data->progress.downloaded>data->progress.uploaded?
00387       data->progress.downloaded:data->progress.uploaded;
00388 
00389     /* remember the exact time for this moment */
00390     data->progress.speeder_time [ nowindex ] = now;
00391 
00392     /* advance our speeder_c counter, which is increased every time we get
00393        here and we expect it to never wrap as 2^32 is a lot of seconds! */
00394     data->progress.speeder_c++;
00395 
00396     /* figure out how many index entries of data we have stored in our speeder
00397        array. With N_ENTRIES filled in, we have about N_ENTRIES-1 seconds of
00398        transfer. Imagine, after one second we have filled in two entries,
00399        after two seconds we've filled in three entries etc. */
00400     countindex = ((data->progress.speeder_c>=CURR_TIME)?
00401                   CURR_TIME:data->progress.speeder_c) - 1;
00402 
00403     /* first of all, we don't do this if there's no counted seconds yet */
00404     if(countindex) {
00405       time_t span_ms;
00406 
00407       /* Get the index position to compare with the 'nowindex' position.
00408          Get the oldest entry possible. While we have less than CURR_TIME
00409          entries, the first entry will remain the oldest. */
00410       checkindex = (data->progress.speeder_c>=CURR_TIME)?
00411         data->progress.speeder_c%CURR_TIME:0;
00412 
00413       /* Figure out the exact time for the time span */
00414       span_ms = Curl_tvdiff(now,
00415                             data->progress.speeder_time[checkindex]);
00416       if(0 == span_ms)
00417         span_ms=1; /* at least one millisecond MUST have passed */
00418 
00419       /* Calculate the average speed the last 'span_ms' milliseconds */
00420       {
00421         curl_off_t amount = data->progress.speeder[nowindex]-
00422           data->progress.speeder[checkindex];
00423 
00424         if(amount > CURL_OFF_T_C(4294967) /* 0xffffffff/1000 */)
00425           /* the 'amount' value is bigger than would fit in 32 bits if
00426              multiplied with 1000, so we use the double math for this */
00427           data->progress.current_speed = (curl_off_t)
00428             ((double)amount/((double)span_ms/1000.0));
00429         else
00430           /* the 'amount' value is small enough to fit within 32 bits even
00431              when multiplied with 1000 */
00432           data->progress.current_speed = amount*CURL_OFF_T_C(1000)/span_ms;
00433       }
00434     }
00435     else
00436       /* the first second we use the main average */
00437       data->progress.current_speed =
00438         (data->progress.ulspeed>data->progress.dlspeed)?
00439         data->progress.ulspeed:data->progress.dlspeed;
00440 
00441   } /* Calculations end */
00442 
00443   if(!(data->progress.flags & PGRS_HIDE)) {
00444     /* progress meter has not been shut off */
00445 
00446     if(data->set.fxferinfo) {
00447       /* There's a callback set, call that */
00448       result= data->set.fxferinfo(data->set.progress_client,
00449                                   data->progress.size_dl,
00450                                   data->progress.downloaded,
00451                                   data->progress.size_ul,
00452                                   data->progress.uploaded);
00453       if(result)
00454         failf(data, "Callback aborted");
00455       return result;
00456     }
00457     else if(data->set.fprogress) {
00458       /* The older deprecated callback is set, call that */
00459       result= data->set.fprogress(data->set.progress_client,
00460                                   (double)data->progress.size_dl,
00461                                   (double)data->progress.downloaded,
00462                                   (double)data->progress.size_ul,
00463                                   (double)data->progress.uploaded);
00464       if(result)
00465         failf(data, "Callback aborted");
00466       return result;
00467     }
00468 
00469     if(!shownow)
00470       /* only show the internal progress meter once per second */
00471       return 0;
00472 
00473     /* If there's no external callback set, use internal code to show
00474        progress */
00475 
00476     if(!(data->progress.flags & PGRS_HEADERS_OUT)) {
00477       if(data->state.resume_from) {
00478         fprintf(data->set.err,
00479                 "** Resuming transfer from byte position %"
00480                 CURL_FORMAT_CURL_OFF_T "\n", data->state.resume_from);
00481       }
00482       fprintf(data->set.err,
00483               "  %% Total    %% Received %% Xferd  Average Speed   "
00484               "Time    Time     Time  Current\n"
00485               "                                 Dload  Upload   "
00486               "Total   Spent    Left  Speed\n");
00487       data->progress.flags |= PGRS_HEADERS_OUT; /* headers are shown */
00488     }
00489 
00490     /* Figure out the estimated time of arrival for the upload */
00491     if((data->progress.flags & PGRS_UL_SIZE_KNOWN) &&
00492        (data->progress.ulspeed > CURL_OFF_T_C(0))) {
00493       ulestimate = data->progress.size_ul / data->progress.ulspeed;
00494 
00495       if(data->progress.size_ul > CURL_OFF_T_C(10000))
00496         ulpercen = data->progress.uploaded /
00497           (data->progress.size_ul/CURL_OFF_T_C(100));
00498       else if(data->progress.size_ul > CURL_OFF_T_C(0))
00499         ulpercen = (data->progress.uploaded*100) /
00500           data->progress.size_ul;
00501     }
00502 
00503     /* ... and the download */
00504     if((data->progress.flags & PGRS_DL_SIZE_KNOWN) &&
00505        (data->progress.dlspeed > CURL_OFF_T_C(0))) {
00506       dlestimate = data->progress.size_dl / data->progress.dlspeed;
00507 
00508       if(data->progress.size_dl > CURL_OFF_T_C(10000))
00509         dlpercen = data->progress.downloaded /
00510           (data->progress.size_dl/CURL_OFF_T_C(100));
00511       else if(data->progress.size_dl > CURL_OFF_T_C(0))
00512         dlpercen = (data->progress.downloaded*100) /
00513           data->progress.size_dl;
00514     }
00515 
00516     /* Now figure out which of them is slower and use that one for the
00517        total estimate! */
00518     total_estimate = ulestimate>dlestimate?ulestimate:dlestimate;
00519 
00520     /* create the three time strings */
00521     time2str(time_left, total_estimate > 0?(total_estimate - timespent):0);
00522     time2str(time_total, total_estimate);
00523     time2str(time_spent, timespent);
00524 
00525     /* Get the total amount of data expected to get transferred */
00526     total_expected_transfer =
00527       (data->progress.flags & PGRS_UL_SIZE_KNOWN?
00528        data->progress.size_ul:data->progress.uploaded)+
00529       (data->progress.flags & PGRS_DL_SIZE_KNOWN?
00530        data->progress.size_dl:data->progress.downloaded);
00531 
00532     /* We have transferred this much so far */
00533     total_transfer = data->progress.downloaded + data->progress.uploaded;
00534 
00535     /* Get the percentage of data transferred so far */
00536     if(total_expected_transfer > CURL_OFF_T_C(10000))
00537       total_percen = total_transfer /
00538         (total_expected_transfer/CURL_OFF_T_C(100));
00539     else if(total_expected_transfer > CURL_OFF_T_C(0))
00540       total_percen = (total_transfer*100) / total_expected_transfer;
00541 
00542     fprintf(data->set.err,
00543             "\r"
00544             "%3" CURL_FORMAT_CURL_OFF_T " %s  "
00545             "%3" CURL_FORMAT_CURL_OFF_T " %s  "
00546             "%3" CURL_FORMAT_CURL_OFF_T " %s  %s  %s %s %s %s %s",
00547             total_percen,  /* 3 letters */                /* total % */
00548             max5data(total_expected_transfer, max5[2]),   /* total size */
00549             dlpercen,      /* 3 letters */                /* rcvd % */
00550             max5data(data->progress.downloaded, max5[0]), /* rcvd size */
00551             ulpercen,      /* 3 letters */                /* xfer % */
00552             max5data(data->progress.uploaded, max5[1]),   /* xfer size */
00553             max5data(data->progress.dlspeed, max5[3]),    /* avrg dl speed */
00554             max5data(data->progress.ulspeed, max5[4]),    /* avrg ul speed */
00555             time_total,    /* 8 letters */                /* total time */
00556             time_spent,    /* 8 letters */                /* time spent */
00557             time_left,     /* 8 letters */                /* time left */
00558             max5data(data->progress.current_speed, max5[5]) /* current speed */
00559             );
00560 
00561     /* we flush the output stream to make it appear as soon as possible */
00562     fflush(data->set.err);
00563 
00564   } /* !(data->progress.flags & PGRS_HIDE) */
00565 
00566   return 0;
00567 }


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:06