42 #define _MPRINTF_REPLACE
46 static void time2str(
char *
r,
int t)
49 int m = (t-(h*3600))/60;
50 int s = (t-(h*3600)-(m*60));
51 sprintf(r,
"%2d:%02d:%02d",h,m,s);
56 static char *max5data(
curl_off_t bytes,
char *max5)
58 #define ONE_KILOBYTE 1024
59 #define ONE_MEGABYTE (1024*1024)
60 #define ONE_GIGABYTE (1024*1024*1024)
74 #if SIZEOF_CURL_OFF_T > 4
113 fprintf(data->
set.
err,
"\n");
214 double total_percen=0;
229 char time_current[10];
234 double total_estimate;
245 "** Resuming transfer from byte position %" FORMAT_OFF_T
249 " %% Total %% Received %% Xferd Average Speed Time Curr.\n"
250 " Dload Upload Total Current Left Speed\n");
334 failf(data,
"Callback aborted");
354 total_estimate = ulestimate>dlestimate?ulestimate:dlestimate;
359 if(total_estimate > 0) {
361 time2str(TIME_Total, (
int)total_estimate);
365 strcpy(time_left,
"--:--:--");
366 strcpy(TIME_Total,
"--:--:--");
372 total_expected_transfer =
382 if(total_expected_transfer > 0)
383 total_percen=((double)total_transfer/total_expected_transfer)*100;
386 "\r%3d %s %3d %s %3d %s %s %s %s %s %s %s",
388 max5data(total_expected_transfer, max5[2]),
struct timeval speeder_time[CURR_TIME]
void Curl_pgrsSetDownloadSize(struct SessionHandle *data, curl_off_t size)
void Curl_pgrsTime(struct SessionHandle *data, timerid timer)
void Curl_pgrsDone(struct connectdata *conn)
struct timeval t_startsingle
long Curl_tvlong(struct timeval t1)
void Curl_pgrsSetDownloadCounter(struct SessionHandle *data, curl_off_t size)
int Curl_pgrsUpdate(struct connectdata *conn)
void Curl_pgrsSetUploadCounter(struct SessionHandle *data, curl_off_t size)
void Curl_pgrsResetTimes(struct SessionHandle *data)
void Curl_pgrsSetUploadSize(struct SessionHandle *data, curl_off_t size)
GLsizei GLsizei GLenum GLenum const GLvoid * data
long Curl_tvdiff(struct timeval newer, struct timeval older)
struct SessionHandle * data
curl_progress_callback fprogress
curl_off_t speeder[CURR_TIME]
GLdouble GLdouble GLdouble r
#define PGRS_DL_SIZE_KNOWN
#define PGRS_UL_SIZE_KNOWN
struct timeval Curl_tvnow(void)
void Curl_pgrsStartNow(struct SessionHandle *data)
int sprintf(idStr &string, const char *fmt,...)